jaydipsavaliya / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

thumb to always be PNG #460

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
hi,
I'm missing option to "force" timthumb to always generate PNG transparent 
thumbs ( query: ?src=...&w=280&h=180&zc=2&ct=1 ).

I was able to hack this by adding just one line of code :)

I have added:
$mimeType = 'image/png';

just after:
$image = $this->openImage ($mimeType, $localImage);

in function processImageAndWriteToCache().

This simple hack will not collide with opening the source image but will force 
rest of code to think that it is working on PNG. With PNG_IS_TRANSPARENT set to 
true, I can get the transparent PNG thumb :)

It would be nice to have this as option (per image or per instalation).

Original issue reported on code.google.com by ladislav...@gmail.com on 1 Aug 2013 at 10:56

GoogleCodeExporter commented 8 years ago
TimThumb used to store everything as png but this meant larger file sizes (in 
general) so it was reverted. As such there's no plans to support something like 
this.

Original comment by BinaryMoon on 27 Sep 2013 at 8:53