You are here

README.txt in ImageAPI 6

Same filename and directory in other branches
  1. 5 README.txt
ImageAPI 

A non writing image manipulation API for Drupal. This API is meant to be used in place of the API provided 
by image.inc. You probably do not need to install this module unless another module you are using requires
it. It provides no new features to your Drupal site. It only provides an API other modules can leverage.

Changes From image.inc API:
  - Images are objects.
  - Images are not written on each image operation and must be explicitly 
    closed when processing is complete. 
  - Multiple Image ToolKits can be used simultaneously. However, only the image
    toolkit and image was opened with can be used to process it. This is hidden 
    in the imageapi layer.

API Quick Reference:
  imageapi_image_scale_and_crop($image, $width, $height) 
  imageapi_image_scale($image, $width, $height, $upscale = FALSE) 
  imageapi_image_resize($image, $width, $height) 
  imageapi_image_rotate($image, $degrees, $bgcolor = 0x000000) 
  imageapi_image_crop($image, $x, $y, $width, $height) 
  imageapi_image_desaturate($image) 
  imageapi_image_open($file, $toolkit = FALSE) 
  imageapi_image_close($image, $destination) 

  $image is an image object returned from imageapi_image_open();

Expanding ImageAPI:

  If you wish to expand on ImageAPI add a new wrapper function to 
  imageapi.module. Do any common preprocessing for all underlying layers in the 
  wrapper function, then invoke the driver. Pay heed to the function naming in
  ImageAPI and ImageAPI GD. If the toolkit changes the size of an image it must
  update the $image->info['width'] and $image->info['height'] variables. All 
  ToolKit functions should return TRUE on success and FALSE on failure.

For more detailed documentation read imageapi.module.

-dopry

File

README.txt
View source
  1. ImageAPI
  2. A non writing image manipulation API for Drupal. This API is meant to be used in place of the API provided
  3. by image.inc. You probably do not need to install this module unless another module you are using requires
  4. it. It provides no new features to your Drupal site. It only provides an API other modules can leverage.
  5. Changes From image.inc API:
  6. - Images are objects.
  7. - Images are not written on each image operation and must be explicitly
  8. closed when processing is complete.
  9. - Multiple Image ToolKits can be used simultaneously. However, only the image
  10. toolkit and image was opened with can be used to process it. This is hidden
  11. in the imageapi layer.
  12. API Quick Reference:
  13. imageapi_image_scale_and_crop($image, $width, $height)
  14. imageapi_image_scale($image, $width, $height, $upscale = FALSE)
  15. imageapi_image_resize($image, $width, $height)
  16. imageapi_image_rotate($image, $degrees, $bgcolor = 0x000000)
  17. imageapi_image_crop($image, $x, $y, $width, $height)
  18. imageapi_image_desaturate($image)
  19. imageapi_image_open($file, $toolkit = FALSE)
  20. imageapi_image_close($image, $destination)
  21. $image is an image object returned from imageapi_image_open();
  22. Expanding ImageAPI:
  23. If you wish to expand on ImageAPI add a new wrapper function to
  24. imageapi.module. Do any common preprocessing for all underlying layers in the
  25. wrapper function, then invoke the driver. Pay heed to the function naming in
  26. ImageAPI and ImageAPI GD. If the toolkit changes the size of an image it must
  27. update the $image->info['width'] and $image->info['height'] variables. All
  28. ToolKit functions should return TRUE on success and FALSE on failure.
  29. For more detailed documentation read imageapi.module.
  30. -dopry