4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: Steel Rat on September 05, 2005, 12:08:47 AM

Title: Thumbnail background colors
Post by: Steel Rat on September 05, 2005, 12:08:47 AM
Hello All,

Been running 4Images for a few days now, added a few mods, things are smooth, life is good.

one question I have not been able to find the answer to, however, is how to change the background colors for thumbnails created by GD. The vast majority of the images I deal with are transparent PNGs, and GD places a black background on all of them. I would prefer a grey or white background so the image detail isn't lost on darker images. Anyone have any quick tips on how to do this?

Thanks in advance!

Title: Re: Thumbnail background colors
Post by: Steel Rat on September 06, 2005, 06:57:38 AM
Anyone?

 8O
Title: Re: Thumbnail background colors
Post by: Steel Rat on October 18, 2005, 11:43:59 PM
Bueller?
 :cry:
Title: Re: Thumbnail background colors
Post by: V@no on October 19, 2005, 03:22:50 PM
At the moment I dont have possibility to test it, so, it might take a few trys before we figure something out.
Try this first:
in includes/image_utils.php find:
Code: [Select]
    $thumb = imagecreatetruecolor($width, $height);Insert below:
Code: [Select]
    imagealphablending($thumb, false);
Please note, in order this to work, you must have GD v2.0.1 or later, with previous versions you will see any changes at all.
Title: Re: Thumbnail background colors
Post by: rshawncg on March 01, 2006, 03:56:22 PM
I have this same problem. Does anyone have fix yet?
I tried the one above but it didn't work.

Thank you.
Title: Re: Thumbnail background colors
Post by: rshawncg on March 14, 2006, 11:08:10 AM
Bump.
Title: Re: Thumbnail background colors
Post by: rbfabbri on February 26, 2008, 02:49:09 AM
Sorry rise this topic.

But someone already knows a solution for this?

Thanks!!!
Title: Re: Thumbnail background colors
Post by: kai on February 26, 2008, 08:50:14 AM
Hm... perhaps this helps:

http://php.about.com/od/advancedphp/ss/gd_library_2.htm