How to detect image data offset for RAW files?

Started by qdwang, September 27, 2021, 04:45:52 AM

Previous topic - Next topic

qdwang

Some dumped HTMLs of exiftool will show the raw data file field. Like `(Panasonic raw data)` for RW2 etc.

Is there a method to detect the raw data(like bayer cfa data) offset in a RAW file?

I've checked https://exiftool.org/gui/articles/tiff_raw.html. It's easy to get any exif info by the HTML dump file.
But I still have no clue to get the raw image part.

Thanks.

Phil Harvey

For RW2:

> exiftool a.rw2 -rawdataoffset
Raw Data Offset                 : 1429892


For TIFF-based formats, you would have to look at StripOffsets for the raw data IFD.

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

qdwang

Thanks for the reply.

I notice that some RAW files has the StripOffsets tag inside and it's easy to locate the raw data part though this tag.

But some RAW files like CR3 have no StripOffsets tag inside.

How to figure out the alternative tag with the same function in those kind of metadata?

Phil Harvey

You may have to deal with each type of raw file differently.  ExifTool doesn't really concern itself with image data, so it probably isn't the right tool for this.

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

qdwang

All right. Still appreciate for the great ExifTool.