Changeset 22796 for branches/version-2_12-dev/data/include
- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/include/image_converter.inc
r22567 r22796 3 3 * 画像ファイルの変換を行う 4 4 */ 5 class ImageConverter 6 { 5 class ImageConverter { 7 6 var $outputImageDir; // 変換後の画像の保存先 8 7 var $outputImageType; // 変換後の画像の形式 … … 12 11 13 12 // コンストラクタ 14 function ImageConverter() 15 { 13 function ImageConverter() { 16 14 $this->outputImageDir = realpath(realpath(dirname(__FILE__))); 17 15 $this->outputImageType = 'jpg'; … … 22 20 23 21 // 変換実行 24 function execute($inputImagePath) 25 { 22 function execute($inputImagePath) { 26 23 // 前処理 27 24 $filestat = @stat($inputImagePath); … … 164 161 165 162 // Setter 166 function setOutputDir($outputDir) 167 { 168 $this->outputImageDir = $outputDir; 169 } 170 function setImageType($imageType) 171 { 172 $this->outputImageType = $imageType; 173 } 174 function setImageWidth($imageWidth) 175 { 176 $this->outputImageWidth = $imageWidth; 177 } 178 function setImageHeight($imageHeight) 179 { 180 $this->outputImageHeight = $imageHeight; 181 } 182 function setFileSize($fileSize) 183 { 184 $this->outputFileSize = $fileSize; 185 } 163 function setOutputDir($outputDir) { $this->outputImageDir = $outputDir; } 164 function setImageType($imageType) { $this->outputImageType = $imageType; } 165 function setImageWidth($imageWidth) { $this->outputImageWidth = $imageWidth; } 166 function setImageHeight($imageHeight) { $this->outputImageHeight = $imageHeight; } 167 function setFileSize($fileSize) { $this->outputFileSize = $fileSize; } 186 168 187 169 // Getter 188 function getOutputDir() 189 { 190 return $this->outputDir; 191 } 192 function getImageType() 193 { 194 return $this->outputImageType; 195 } 196 function getImageWidth() 197 { 198 return $this->outputImageWidth; 199 } 200 function getImageHeight() 201 { 202 return $this->outputImageHeight; 203 } 170 function getOutputDir() { return $this->outputDir; } 171 function getImageType() { return $this->outputImageType; } 172 function getImageWidth() { return $this->outputImageWidth; } 173 function getImageHeight() { return $this->outputImageHeight; } 204 174 205 175 /* 206 176 * PrivateMethod 207 177 */ 208 function beforeExecute() 209 { 178 function beforeExecute() { 210 179 } 211 180 … … 217 186 * @return array 色情報 218 187 */ 219 function getTransparentColor($image) 220 { 188 function getTransparentColor($image) { 221 189 $max_x = imagesx($image) - 1; 222 190 $max_y = imagesy($image) - 1;
Note: See TracChangeset
for help on using the changeset viewer.