I have written a script called the Leonardo Image Functions Library, which is a library of image functions (obviously) that lets you do some pretty complex stuff with simple functions. This allows you to edit images easier than you would with the normal GD functions. Please check it out here.
Also, please give your feedback. You can find ways to contact me in my profile, or send me a mesage.
If you have ideas for the next version, please contact me. Currently, I am working on a beveling function and a gradient line function.
Download the code, examples, and documentation here.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
__________________ STFW and RTFM before u WMFT!!
As you guys seem to know about the GD lib. Can anyone show me a working example of using the imageinterlace() function. I have a program the i am trying to output uploaded photo's which i assumed could be displayed fuzzy first before true image appears, (have seen this on sites). I thought to create the image using imageinterlace() would work, bit it appears the same when the browser loads. a small snippet of my code:
ImageInterlace($img,1); // turn on interlace
ImageJPEG($img,"$IMG_ROOT/$dest_file_prefix$file_name", $JPG_QUALITY); // create image.
I would not bother people without trying to find the answers in manuals, but the function is not really documented very well.
You can't use imageinterlace() and imagejpeg() together. An interlaced JPEG will not load in the conventional interlaced style, but rather when it's completed. Normally, a JPEG loads from top left to bottom right in horizontal chunks. An interlaced JPEG will not show anything (it will return headers) until it's completely downloaded.
Is there anyway to change the contrast of an image with GD (and PHP)? I've made a tool to make one of those "Ctrl+A"-images you've probably seen, and to change contrast would make it even better. I know that it's possible with ImageMagick, but I'd preferred to not use an external resource.