Mouseover for IFD offsets in -htmldump0 output

Started by Leonard WHYTE, January 19, 2019, 01:34:30 AM

Previous topic - Next topic

Leonard WHYTE

Phil, Have you thought about highlighting the IFD header (but not the date) whenever the user mouses-over an IFD offset, like the EXIFOffset in the TIFF header, or the Interoperability IFD in the EXIF header?  It would be really useful, and avoid me having to get the value and do the addition to get from the offset to the actual IFD header.  What do you think?  Len

PS:  I love exiftool.  For some of the JPEG massaging that I do, it saves me HEAPS of time.

Phil Harvey

Hi Leonard,

First let me say it is great to hear someone making use of the -htmldump feature.

So let me understand.  What do you mean by IFD header?  There is no real header to the IFD.  It begins with a 2-byte count of the number of entries.  Do you want to highlight this count when you roll over the ExifOffset?

Also you mention an addition.  Generally the base offset for the EXIF IFD is the start of the TIFF header, which is the start of the file for TIFF images, and usually at byte 0x0c in JPEG images.  Is this the addition?  (ExifOffset + 0x0c in most cases?).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Leonard WHYTE

Thanks for getting back Phil.   What I mean by an IFD header is the two-byte tag count, and the tags (each 12 bytes) themselves.  Some of the tags contain data inline.  Other tags have a reference to the data, which exists, as you say, at the specified offset from the IFD base address.  I find myself having to do this addition manually.

As things stand, if I mouse over the Xresolution tag in an a TIFF IFD, then you highlight the XResolution value.

BUT, if I mouse over the ExifOffset in the same TIFF IFD, then you don't highlight the EXIF IFD.  That's an example of what I'm looking for.

But it also applies to mousing over an InteropOffset within the EXIF IFD.  I don't then get the Interop IFD highlighted.

Make sense?

Len

Phil Harvey

OK, I see.  You want the entire IFD highlighted, but not the values.  Got it.

That may be a bit tricky, but I'll see what I can do.

- Phil

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Leonard WHYTE

Yeah.  Probably nested <div>s and all that horrible stuff.  But if it is possible, it would be great.  I'll even cough up another donation ;-)

Phil Harvey

Hi Leonard,

I think I was able to accomplish what you wanted with a creative use of the html class names and some extra javascript code.  So now when you mouse over ExifOffset, the EXIF IFD is highlighted (the count, entries and next-ifd pointer).  The same goes when you mouse over InteropIFD, GPSInfo or any other offset that points to a valid IFD (like the IFD1 offset).

This update is included in ExifTool 11.26 which I have just released.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

Whoa.  This is more complex than I thought.  The current version doesn't deal well with multiple IFD's containing SubIFD's or multiple SubIFD's in an IFD -- I've got some work to do to fix this, but the next release will have to wait until after I get back from vacation next week.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Leonard WHYTE

Take your time to enjoy your vacation.  Thanks so much for looking at this.

Phil Harvey

Did you read my 2nd-last post?  Did you try the new version?

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Leonard WHYTE

Phil, yes, I downloaded it and am using it.  It pretty much meets my immediate needs, so if you either need more time to perfect it, or even never get around to finalising it, I'm happy as is.

Leonard WHYTE

... and I put another 100USD in the tin.  Thanks for all your great work.  For what I'm doing, exiftool saves me heaps of time and energy.