Most the images I reference on my site are quite large, yet the browser viewable versions are presented as smaller versions, via the imagecache module.

It would seem to be useful to allow a combined display option of imagecache/annotate for these sorts of cases.

CommentFileSizeAuthor
#1 image_annotate.zip2.75 KBrobert.oconnell

Comments

robert.oconnell’s picture

StatusFileSize
new2.75 KB

I have experimented with this module, and think I have at least the beginnings of the ability for this module to work with imagecache, (if (module_exists('imagecache'))).
The idea is that besides the 'image with annotation' formatter, each of the imagecache presets has its own '$preset image with annotation' formatter which the user can choose.
This will then theme through the existing image_annotate_theme processing but passing in an imagecache preset. This preset then drives conditional logic that will forward to the imagecache theme for the 'default' style (since clicking on the image doesn't seem useful with the annotation module enabled) calls instead of imagefield_image.

I have tested it for my case with imagecache installed, and it works as I expect. I haven't tried it in the other scenarios with no permissions or no imagecache installed, but the idea seems OK to me.

I have attached the zipped changed module file, which is the only file containing changes for this. This has changes against the version I downloaded originally:
version = "6.x-2.1"
core = "6.x"
project = "image_annotate"
datestamp = "1266406506"
which appears to still be the latest (possibly excluding the dev version).

I haven't done any module development work before, so may have completely missed the point of how to override and combine modules, etc. Please let me know if there was a simpler way through site theming, for instance, instead of module development...

robert.oconnell’s picture

I am wondering- I saw another comment (http://drupal.org/node/367841) discussing unscaled references for the annotation boundary box. This would obviously be helpful in the event that multiple imagecached representations are using the image_annotation.

Assuming that the imagecache ONLY scales an image, this would obviously be easy. But allowing rotations and cropping would indeed cause some confusion, as is being mentioned in the other thread.

StudioARE’s picture

Tested the modified module and it works great!
Exactly what we needed to support imagecache presets.

-Are

The Hank’s picture

I can also confirm that this works. Thanks!

pribeh’s picture

Confirmation. Works great and should be included.