Convert TIF w/annotations to JPG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kblair

Convert TIF w/annotations to JPG

Post by kblair »

I have a very large group of images that have been annotated by the Wang/Kodak (imgedit.ocx) formerly distributed with Windows. I need to convert these to jpeg files and retain the annotations. When I run convert, I get a series of warnings which I have read elseware I can ignore. However, the created jpg file does not have the annotations that were in the original.

convert 4.tif 4.jpg
convert: 4.tif: unknown field with tag 32932 (0x80a4) encountered. `TIFFReadDirectory'.
convert: 4.tif: unknown field with tag 32934 (0x80a6) encountered. `TIFFReadDirectory'.
convert: incorrect count for field "Tag 32934" (0, expecting 1); tag ignored. `4.tif'.

so, is there a way to convert these and retain the annotations?

Thanks,

Kent
rvanderpoel
Posts: 6
Joined: 2015-11-03T13:13:21-07:00
Authentication code: 1151

Re: Convert TIF w/annotations to JPG

Post by rvanderpoel »

Hi Kent,

It's been a few years now but I was wondering whether you ever got anything working as I now need to do a similar thing, extract annotations from TIFF files or burn them into the image.

Thanks
Rob
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convert TIF w/annotations to JPG

Post by fmw42 »

You might be able to extract the text using EXIFTOOL and then use Imagemagick to write the text onto the image and convert to JPG
rvanderpoel
Posts: 6
Joined: 2015-11-03T13:13:21-07:00
Authentication code: 1151

Re: Convert TIF w/annotations to JPG

Post by rvanderpoel »

Thanks, I'll look into it. Hadn't considered going the EXIF route
rvanderpoel
Posts: 6
Joined: 2015-11-03T13:13:21-07:00
Authentication code: 1151

Re: Convert TIF w/annotations to JPG

Post by rvanderpoel »

So far I have managed to get it to extract the tag but, unfortunately, it only extracts it as binary data. I can see the text in there but no idea how to get other data such as font details and positioning.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert TIF w/annotations to JPG

Post by snibgo »

If you post a sample, someone may take a look.
snibgo's IM pages: im.snibgo.com
rvanderpoel
Posts: 6
Joined: 2015-11-03T13:13:21-07:00
Authentication code: 1151

Re: Convert TIF w/annotations to JPG

Post by rvanderpoel »

Thanks for the suggestion, snibgo.

I'm new to this forum so not sure whether this will work.

Here is a link to the TIFF. I've had to redact quite a bit. TIFF with annotations

Here's a link to a screen shot of the image with the annotations in a supported viewer. The annotations are highlighted in yellow. Screenshot showing annotations

From what I've been able to find out the annotations are in an Eastman/eiStream format.

If someone can take a look that would be greatly appreciated.

Thanks
Rob
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert TIF w/annotations to JPG

Post by snibgo »

You've probably figured that ...

Code: Select all

exiftool -b -IFD0:WangAnnotation x.tiff >x.txt
... dumps the binary. This seems to be text data, readable as numbers between 0 and 255. I suppose "Bottom Left" would be here as "66 111 116 116 111 109 32 76 101 102 116".

It would take more work (and examples) to work out what the other numbers mean.
snibgo's IM pages: im.snibgo.com
rvanderpoel
Posts: 6
Joined: 2015-11-03T13:13:21-07:00
Authentication code: 1151

Re: Convert TIF w/annotations to JPG

Post by rvanderpoel »

That's pretty much where I got to. I was hoping that ImageMagick might have some capability to read this stuff and then burn it back in as part of the image but doesn't sound like it and I'll need to look into other options.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert TIF w/annotations to JPG

Post by snibgo »

IM does not contain code that will read these annotations. http://web.archive.org/web/200503091413 ... nospec.htm might be the specification for the data.

I see that the format was already considered old and dead in 2006.
snibgo's IM pages: im.snibgo.com
rvanderpoel
Posts: 6
Joined: 2015-11-03T13:13:21-07:00
Authentication code: 1151

Re: Convert TIF w/annotations to JPG

Post by rvanderpoel »

Looks like I'll have to build my own utility to get them out and then I can use IM to burn them in. Many thanks for looking into this for me.

Cheers
Rob
Post Reply