Is there any way I can get ImageCache to scale my images to a size, which is set dynamically by a custom module and not by a preset?
I can't use presets since the image size will vary with each new image and each picture in principle can require different dimensions than any other picture already scaled. But once the single image has been scaled, it's reused in the scaled version every time it's used by my module.
I have previously (in non-Drupal systems) used a small script, which scaled the image, output the image data and at the same time wrote the image data to a file named cache_nnn_myimage.jpg where nnn would be the width of the image in pixels. My small script could then check for an existing image file with the proper size and just return that in case the image had already been scaled to the required size.
But I don't want to introduce yet another image scaling and caching system when ImageCache does such a nice job and I already use that in most of my projects.
I have searched the issues here as well as out on da big web, but been unable to find anything on this subject.
Martin
Comments
Comment #1
fizk commentedPlease reopen if this is still an issue with ImageCache 6.x-2.0-rc1.