[Owncloud] OC_Image class
Thomas Olsen
thomas at tanghus.net
Sat Dec 31 21:26:10 UTC 2011
I've just recently added thumbnails to the contact list in the Contacts app.
In the process I made yet another script for resizing/cropping images which
means that there are several scripts doing basically the same.
After advice from Bart I have started coding an OC_Image class for
manipulating images.
For now it has only the functionality I need for creating the thumbnails which
boils down to:
$image = new OC_Image(path or image resource);
$image->centerCrop(); // crops image to a square.
$image->resize(25); // resizes to max width/height while keeping aspect ratio
$image->show();
What other methods would be useful? Should it be able to load an image from a
string or maybe from OC_Filesystem?
Bring on your (useful) ideas :-)
--
Med venlig hilsen / Best Regards
Thomas Tanghus
More information about the Owncloud
mailing list