Image toolkits

  1. cis7 includes/ image
  2. cle7 includes/ image
  3. elmsmedia7 includes/ image
  4. icor7 includes/ image
  5. meedjum_blog7 includes/ image
  6. mooc7 includes/ image

Functions for image file manipulations.

Drupal's image toolkits provide an abstraction layer for common image file manipulations like scaling, cropping, and rotating. The abstraction frees module authors from the need to support multiple image libraries, and it allows site administrators to choose the library that's best for them.

PHP includes the GD library by default so a GD toolkit is installed with Drupal. Other toolkits like ImageMagick are available from contrib modules. GD works well for small images, but using it with larger files may cause PHP to run out of memory. In contrast the ImageMagick library does not suffer from this problem, but it requires the ISP to have installed additional software.

Image toolkits are discovered based on the associated module's hook_image_toolkits. Additionally the image toolkit include file must be identified in the files array in the file. The toolkit must then be enabled using the admin/config/media/image-toolkit form.

Only one toolkit may be selected at a time. If a module author wishes to call a specific toolkit they can check that it is installed by calling image_get_available_toolkits(), and then calling its functions directly.


Namesort descending Location Description
image_crop includes/ Crops an image to a rectangle specified by the given dimensions.
image_desaturate includes/ Converts an image to grayscale.
image_dimensions_scale includes/ Scales image dimensions while maintaining aspect ratio.
image_gd_check_settings modules/system/ Verify GD2 settings (that the right version is actually installed).
image_gd_create_tmp modules/system/ Create a truecolor image preserving transparency from a provided image.
image_gd_crop modules/system/ Crop an image using the GD toolkit.
image_gd_desaturate modules/system/ Convert an image resource to grayscale.
image_gd_get_info modules/system/ Get details about an image.
image_gd_load modules/system/ GD helper function to create an image resource from a file.
image_gd_resize modules/system/ Scale an image to the specified size using GD.
image_gd_rotate modules/system/ Rotate an image the given number of degrees.
image_gd_save modules/system/ GD helper to write an image resource to a destination file.
image_gd_settings modules/system/ Retrieve settings for the GD2 toolkit.
image_gd_settings_validate modules/system/ Validate the submitted GD settings.
image_get_available_toolkits includes/ Gets a list of available toolkits.
image_get_info includes/ Gets details about an image.
image_get_toolkit includes/ Gets the name of the currently used toolkit.
image_load includes/ Loads an image file and returns an image object.
image_resize includes/ Resizes an image to the given dimensions (ignoring aspect ratio).
image_rotate includes/ Rotates an image by the given number of degrees.
image_save includes/ Closes the image and saves the changes to a file.
image_scale includes/ Scales an image while maintaining aspect ratio.
image_scale_and_crop includes/ Scales an image to the exact width and height given.
image_toolkit_invoke includes/ Invokes the given method using the currently selected toolkit.


includes/, line 8
API for manipulating images.




Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.