gopalindians / timthumb

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

Creating transparent images instead of using borders to make up the extra space (zc=2) #205

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I used the following modified code from around line 167 to set the black 
background (borders) to be transparent instead.

    // Restore transparency blending
    imagesavealpha ($canvas, true);

    // Set transparency on background color
    imagecolortransparent($canvas, $color);

Then I forced imagepng instead of imagejpeg to ensure transparency would be 
saved in the show_image function.

Original issue reported on code.google.com by sc0ttkclark on 11 Jul 2011 at 4:42

GoogleCodeExporter commented 9 years ago
This creates large image sizes. I used to do this but got lots of complaints 
about it. I have now added a parameter for changing the colour of the 
background which should help a lot.

Original comment by BinaryMoon on 17 Jul 2011 at 7:55

GoogleCodeExporter commented 9 years ago
hi, where i can get the code for the parameter for changing the colour of the 
background?

Original comment by alhose...@gmail.com on 4 Apr 2012 at 6:43