Changing any PNG file to 8bit PNG File

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
ahsanra
Forum Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:57 am

Changing any PNG file to 8bit PNG File

Post by ahsanra »

Hi,

My software only works with PNG files and in that only 8 bit PNG Files.
So i want it to be dynamic and incase there is need of using any PNG file i want my software to change it in 8 bit first and then use it in software.

How can i change any PNG File no matter what resolution it has to 8 Bit PNG Files


Thanks
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

http://uk2.php.net/imagetruecolortopalette

There's a function in first comment that does a decent job of what you want.
ahsanra
Forum Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:57 am

Post by ahsanra »

Thanks alot

I wonder how many time i have to thank you
Post Reply