I've added the class to the 'oc_image' branch: https://gitorious.org/~tanghus/owncloud/tanghus-owncloud/blobs/oc_image/lib/image.php
Anyone willing to do a little code review and catch my errors? On Saturday 31 December 2011 22:26 Thomas Olsen wrote: > 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 _______________________________________________ Owncloud mailing list [email protected] https://mail.kde.org/mailman/listinfo/owncloud
