Author Topic: Thumbnail background colors  (Read 7291 times)

0 Members and 1 Guest are viewing this topic.

Offline Steel Rat

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Infinite Realities
Thumbnail background colors
« 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!


Offline Steel Rat

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Infinite Realities
Re: Thumbnail background colors
« Reply #1 on: September 06, 2005, 06:57:38 AM »
Anyone?

 8O

Offline Steel Rat

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Infinite Realities
Re: Thumbnail background colors
« Reply #2 on: October 18, 2005, 11:43:59 PM »
Bueller?
 :cry:

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Thumbnail background colors
« Reply #3 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.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline rshawncg

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Thumbnail background colors
« Reply #4 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.

Offline rshawncg

  • Pre-Newbie
  • Posts: 2
    • View Profile
Re: Thumbnail background colors
« Reply #5 on: March 14, 2006, 11:08:10 AM »
Bump.

Offline rbfabbri

  • Newbie
  • *
  • Posts: 27
    • View Profile
Re: Thumbnail background colors
« Reply #6 on: February 26, 2008, 02:49:09 AM »
Sorry rise this topic.

But someone already knows a solution for this?

Thanks!!!

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
Re: Thumbnail background colors
« Reply #7 on: February 26, 2008, 08:50:14 AM »
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search