-
- Downloads
- Patch #16358 by James: added toolkit to enable better image handling. The...
- Patch #16358 by James: added toolkit to enable better image handling. The avatar code and the upload module have been updated to take advantage of the new image API. There are 5 main functions that modules may now utilize to handle images: * image_get_info() - this function checks a file. If it exists and is a valid image file, it will return an array containing things like the pixel dimensions of the image, plus the 'type' and common extension. * image_scale - resizes a given image to fit within a given width / height dimensions, while maintaining aspect ratio (not distorting the image). This function can be used to generate thumbnails, or ensure a maximum resolution, etc. * image_resize - similar to image_scale (but will not respect aspect ratio - may well distort the image). * image_rotate - rotate an image by X degrees * image_crop - crops an image to a given rectangle (defined as top-left x/y coordinates plus a width & height of the rectangle). Contribution modules will now be able to rely on these base manipulation functions to offer additional functionality (such as image nodes, photo galleries, advanced image manipulation, etc).
parent
7931c778
No related branches found
No related tags found
Showing
- CHANGELOG.txt 1 addition, 0 deletionsCHANGELOG.txt
- includes/common.inc 1 addition, 0 deletionsincludes/common.inc
- includes/image.inc 292 additions, 0 deletionsincludes/image.inc
- modules/system.module 12 additions, 1 deletionmodules/system.module
- modules/system/system.module 12 additions, 1 deletionmodules/system/system.module
- modules/upload.module 26 additions, 2 deletionsmodules/upload.module
- modules/upload/upload.module 26 additions, 2 deletionsmodules/upload/upload.module
- modules/user.module 9 additions, 28 deletionsmodules/user.module
- modules/user/user.module 9 additions, 28 deletionsmodules/user/user.module
Loading
Please register or sign in to comment