imagegif - minimizing file size when creating .gif in gd

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
idotpdot
Forum Newbie
Posts: 2
Joined: Mon Jan 15, 2007 4:18 pm

imagegif - minimizing file size when creating .gif in gd

Post by idotpdot »

hello everyone, i'm a newbie here. great forum/site you have.

i've been doing some work overlaying text over gifs using php gd. essentially i have a .gif image and i am generating and displaying text over it. simple stuff. my main concern is file size and i've done all i can to minimize file size when creating the main image (.gif) in photoshop but it always seems to double in size when gd spits out the final product.

now i know i've added some colors in the process for use in displaying text and whatnot so i'm sure gd will add size to it. i'm just looking to minimize it.

i'm wondering if there is anything similar to imagejpeg's "quality" parameter for imagegif? it probably wouldn't be quality, maybe something along the lines of "number of colors". just wondering if anyone can shed some light on what my options might be.

thanks in advance!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Take a look at the term called quantizing or quantization.
idotpdot
Forum Newbie
Posts: 2
Joined: Mon Jan 15, 2007 4:18 pm

Post by idotpdot »

thanks alot, i'll look into that!
Post Reply