Programmatically create presets

Jay Matwichuk - May 17, 2009 - 22:40
Project:ImageCache
Version:6.x-2.0-beta9
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Is it possible to programmatically create imagecache presets? I am creating a module that will grab images remotely, scale/crop them, and then display them to the user. I will be using imagecache to do the scaling/cropping, so the imagecache module will be a dependency for my module. I would like to set it up so that my module automatically creates the imagecache preset that it will use to scale/crop the images if possible, instead of having to go in and manually set the sizes in the imagecache admin interface. Is this possible?

#1

svendecabooter - July 2, 2009 - 08:54
Status:active» fixed

Check the imagecache.api.php file in the ImageCache package for more information about the hook_imagecache_default_presets(), which you will need to achieve this

#2

Jay Matwichuk - July 2, 2009 - 15:28

Thanks mate, I'll play with that.

#3

System Message - July 16, 2009 - 15:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#4

WoozyDuck - September 9, 2009 - 02:39
 
 

Drupal is a registered trademark of Dries Buytaert.