@@ 274-291 (lines=18) @@ | ||
271 | imagecopymerge($oSrcImg, $oWatermarkImg, $dest_x, $dest_y, 0, 0, $watermark_width, $watermark_height, $transparency); |
|
272 | } |
|
273 | ||
274 | switch ($srcImgInfo['mime']) { |
|
275 | case 'image/gif': |
|
276 | imagegif($oSrcImg, $src); |
|
277 | break; |
|
278 | case 'image/jpeg': |
|
279 | imagejpeg($oSrcImg, $src, $quality); |
|
280 | break; |
|
281 | case 'image/png': |
|
282 | if (function_exists('imagesavealpha') && function_exists('imagealphablending')) { |
|
283 | imagealphablending($oSrcImg, false); |
|
284 | imagesavealpha($oSrcImg, true); |
|
285 | } |
|
286 | imagepng($oSrcImg, $src); |
|
287 | break; |
|
288 | case 'image/wbmp': |
|
289 | imagewbmp($oSrcImg, $src); |
|
290 | break; |
|
291 | } |
|
292 | ||
293 | imageDestroy($oSrcImg); |
|
294 | imageDestroy($oWatermarkImg); |
@@ 155-172 (lines=18) @@ | ||
152 | return false; |
|
153 | } |
|
154 | ||
155 | switch ($srcImgInfo['mime']) { |
|
156 | case 'image/gif': |
|
157 | imagegif($tmp, $src); |
|
158 | break; |
|
159 | case 'image/jpeg': |
|
160 | imagejpeg($tmp, $src, $quality); |
|
161 | break; |
|
162 | case 'image/png': |
|
163 | if (function_exists('imagesavealpha') && function_exists('imagealphablending')) { |
|
164 | imagealphablending($tmp, false); |
|
165 | imagesavealpha($tmp, true); |
|
166 | } |
|
167 | imagepng($tmp, $src); |
|
168 | break; |
|
169 | case 'image/wbmp': |
|
170 | imagewbmp($tmp, $src); |
|
171 | break; |
|
172 | } |
|
173 | ||
174 | imagedestroy($oSrcImg); |
|
175 | imagedestroy($tmp); |