4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started 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!
-
Anyone?
8O
-
Bueller?
:cry:
-
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: $thumb = imagecreatetruecolor($width, $height);
Insert below: 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.
-
I have this same problem. Does anyone have fix yet?
I tried the one above but it didn't work.
Thank you.
-
Bump.
-
Sorry rise this topic.
But someone already knows a solution for this?
Thanks!!!
-
Hm... perhaps this helps:
http://php.about.com/od/advancedphp/ss/gd_library_2.htm