Active
Project:
ImageAPI
Version:
6.x-1.x-dev
Component:
ImageAPI Imagick
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 May 2008 at 05:48 UTC
Updated:
10 Jul 2009 at 11:01 UTC
I work in library and archives and deal with a lot of tif files. Is it be possible to implement a tif to jpg derivative system that could be used by either imagecache and/or imagefield? I know that imagemagick supports are wide variety of file types so other types could be easily added.
I've done simple convert image.tif image.jpg and it works nicely. Would this be difficult? I be happy to test any way I can, although I have no real coding skills.
Comments
Comment #1
drewish commentedthis'd need to be committed to HEAD and then backported but yeah, this should be do-able... i guess the trick would be to have a list of "valid" web extensions like jpg, png and gif and if the original extension isn't in that list replace it with jpg.
Comment #2
whereisian commentedBrilliant. Good news. I'm surprised this issue hasn't come up elsewhere. I've had a few thougths, so I hope this helps.
Imagefield provides an option to restrict by file extention. Currently, this happily allows me to add tif, pdf and psd file types. Ideally, I suppose imageapi could validate that against the toolkit being used. Imagemagick will spit off a list of supported types with
identify -list format.If I understand correctly, imagecache wouldn't need to be aware of a conversion because it calls imageapi. So It would ask for a derivative of a tif and receive a jpg.
The only thing other than that is that imagefield will still fail to display a thumbnail of the original file on the node edit page. Would it be worth starting a feature request to see if it could display a scaled image of an imagecache file?
Please let me know how I can help. I've busted out my PHP book and api.drupal.org and am trying to decifer the code.
Comment #3
mglover commentedI also work for an archives & library (in Mississippi) and I'm looking for exactly this same functionality. I may take a crack at it myself, but I look forward to seeing what more experienced people come up with.
Comment #4
deepermotive commentedI'm just starting to wrestle with this as well for our intranet; we have several scientists who work with tiffs for a lot of images. Checking the list of formats that imagemagick supports, maybe it's worth adding support for creating web viewable versions of tiffs plus PDFs, something else that gets uploaded often (at least here).
Comment #5
MGParisi commentedimagemagick supports them all (tiff, bmp, etc) and can convert them to .jpg which would be the best option for display due to size limitations!
Comment #6
wuwei23 commentedSubscribing
Comment #7
egfrith commentedThis issue in the imagecache module is primarily addressed at converting PDF files using imagemagick, but would also work for tif files: #366373: PDF support ( i.e. convert PDF to JPG support).
Comment #8
Alex Andrascu commentedwe still need a patch for the ImageField for this to work. Aren't we ?
Comment #9
egfrith commentedI have tested the work so far with filefield, but not with imagefield. Given that the changes are at a fairly low leve, I suppose it might work for imagefield...but I don't know.