Resizing Grayscale Pictures

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

Post Reply
Forum Newbie
Posts: 1
Joined: Fri Jul 15, 2011 11:16 pm

Resizing Grayscale Pictures

Post by emihaumut »

Hey, I've been having a lot of issues trying to resize grayscaled images. Google has only been giving me links on how to convert images to grayscale, but that's not what I need. At all.

Here's an example of what's going on. I'm trying to resize ... 2%20v3.png for thumbnails but I keep getting images like ... .png&w=600. (Please ignore the lameness of the image.)

I've read that php and gd has trouble loading grayscale images when you use imagecreatefrompng, but is there a workaround or fix for that? That little snippet was posted some five years ago. I have trouble believing this is still the case.

Post Reply