Hi All,
I have started a gd image library project for Joomla 1.6 here:
http://code.google.com/p/gd-image-library-for-joomla/Originally the project was a wrapper to wideimage:
http://www.alltogetherasawhole.org/profiles/blogs/wideimage-library...But I figured it would be better to do a mini fork of wideimage, and customise it to fit the needs of Joomla.
The library does what wideimage does, minus a few advanced things like ApplyConvolution. It also writes with the Joomla ftp layer if turned on and uses JError to raise messages. The messages are kept in a language ini file, so the library is translatable using Joomla's langauge system.
The library supports jpegs, gifs, pngs (transparancies ok), and will do Resize, Crop, Rotate, Watermark with image, Watermark with text, Rounded corners, Mirror, Flip, Greyscale, Applymask, CorrectGamma.
Using the library is as easy as:
if(!jimport('gdimage.GdImage') ){
return JError::raiseError(500, 'Image Library Not Found');
}
$sourcePath = JPATH_SITE.DS.'images'.DS.'tree.jpg';
$resizedPath = JPATH_SITE.DS.'images'.DS.'tree_resized.jpg';
GDImage::load($sourcePath)->resize(300, 400)->saveToFile($resizedPath);
More example are here:
http://code.google.com/p/gd-image-library-for-joomla/wiki/codeexamples
I will be bug doing testing and bug fixing over the next week.
If you want to contribute or suggest features let me know.
You need to be a member of All Together, As A Whole to add comments!
Join All Together, As A Whole