How to view the IDC and MRWInfo tags in the ARW image?

Started by drcq, June 07, 2020, 11:24:58 AM

Previous topic - Next topic

drcq

I'm looking for IDC and MRWInfo metatags stored in my ARW images. I checked with the -Verbose option to see if such content is available and both directories are detected, but the content is still not show.
| 21) SR2Private (SubDirectory) -->
  | + [SR2 directory with 9 entries]
  | | 0)  SR2SubIFDOffset = 51712
  | | 1)  SR2SubIFDLength = 42826
  | | 2)  Sony_SR2Private_0x7202 = 0
  | | 3)  Sony_SR2Private_0x7220 = 1
  | | 4)  SR2SubIFDKey = 1144201745
  | | 5)  IDC_IFD (SubDirectory) -->
  | | + [SonyIDC directory]
  | | 6)  Sony_SR2Private_0x7241 = 0
  | | 7)  MRWInfo (SubDirectory) -->
  | | 8)  Sony_SR2Private_0x7251 = 0
My current options are:  -k -a -u -H -G5 -g5 -e -v. What must be set to get these data extracted?

Regards,
Christoph

StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

drcq

Yes, as shown above the -u option is set.

I checked the binary files for the Sony ARW images and find out, that the IDC dictionary is always located 6 bytes behind the offset value from the IDC_IFD (0x7240) tag. This is probably the problem of the exiftool, that at the specified offset no dictionary is located. I checked it for ca. 20 different types of Sony cameras and all of them need this additional offset shift of 6 bytes. Seems to be a small bug in the exiftool.

Concerning the MRWInfo tag my personal believe is that the meaning of this tag has been changed. All investigated images have a fixed size of 18432 and tag type SHORT for MRWInfo. Non of them contains DNGPrivateTag key. So the data must have a different meaning now.

Regards,
Christoph

JosR

For one of my A700 ARW files I get with your command line:

  | + [SR2 directory with 9 entries]
  | | 0)  SR2SubIFDOffset = 35648
  | | 1)  SR2SubIFDLength = 62112
  | | 2)  Sony_SR2Private_0x7202 = 0
  | | 3)  Sony_SR2Private_0x7220 = 1
  | | 4)  SR2SubIFDKey = 1144201745
  | | 5)  IDC_IFD (SubDirectory) -->
  | | + [SonyIDC directory]
  | | 6)  Sony_SR2Private_0x7241 = 0
  | | 7)  MRWInfo (SubDirectory) -->
  [MRW Data Offset: 0xb8]
MRW PRD segment (24 bytes):
  | | | + [BinaryData directory, 24 bytes]
  | | | | FirmwareID = 21870002
  | | | | SensorHeight = 2856
  | | | | SensorWidth = 4288
  | | | | ImageHeight = 2848
  | | | | ImageWidth = 4272
  | | | | RawDepth = 12
  | | | | BitDepth = 12
  | | | | StorageMethod = 89
  | | | | BayerPattern = 0
MRW WBG segment (12 bytes):
  | | | + [BinaryData directory, 12 bytes]
  | | | | WBScale = 2 2 2 2
  | | | | WB_RGGBLevels = 557 256 256 360
MRW RIF segment (116 bytes):
  | | | + [BinaryData directory, 116 bytes]
  | | | | Saturation = 0
  | | | | Contrast = 0
  | | | | Sharpness = 0
  | | | | WBMode = 0
  | | | | ProgramMode = 128
  | | | | ISOSetting = 255
  | | | | BWFilter = 0
  | | | | Hue = -1
  | | | | ZoneMatching = 0
  | | | | ColorTemperature = 0
  | | | | ColorFilter = 0
  | | 8)  Sony_SR2Private_0x7251 = 0
  | | + [SR2SubIFD directory with 136 entries]


Or, formatted differently with Exiftool -F -H -G1 -a -U
[Sony]          0xb02c Preview Image Size              : 1616x1080
[InteropIFD]    0x0001 Interoperability Index          : R98 - DCF basic file (sRGB)
[InteropIFD]    0x0002 Interoperability Version        : 0100
[SR2]           0x7200 SR2 Sub IFD Offset              : 35648
[SR2]           0x7201 SR2 Sub IFD Length              : 62112
[SR2]           0x7202 Sony SR2 Private 0x7202         : 0
[SR2]           0x7220 Sony SR2 Private 0x7220         : 1
[SR2]           0x7221 SR2 Sub IFD Key                 : 0x44332211
[SR2]           0x7241 Sony SR2 Private 0x7241         : 0
[SR2]           0x7251 Sony SR2 Private 0x7251         : 0
[MinoltaRaw]    0x0000 Firmware ID                     : 21870002
[MinoltaRaw]    0x0008 Sensor Height                   : 2856
[MinoltaRaw]    0x000a Sensor Width                    : 4288
[MinoltaRaw]    0x000c Image Height                    : 2848
[MinoltaRaw]    0x000e Image Width                     : 4272
[MinoltaRaw]    0x0010 Raw Depth                       : 12
[MinoltaRaw]    0x0011 Bit Depth                       : 12
[MinoltaRaw]    0x0012 Storage Method                  : Linear
[MinoltaRaw]    0x0013 Minolta Raw PRD 0x0013          : 2
[MinoltaRaw]    0x0014 Minolta Raw PRD 0x0014          : 1
[MinoltaRaw]    0x0015 Minolta Raw PRD 0x0015          : 0
[MinoltaRaw]    0x0016 Minolta Raw PRD 0x0016          : 0
[MinoltaRaw]    0x0017 Bayer Pattern                   : Unknown (0)
[MinoltaRaw]    0x0000 WB Scale                        : 2 2 2 2
[MinoltaRaw]    0x0004 WB RGGB Levels                  : 557 256 256 360
[MinoltaRaw]    0x0000 Minolta Raw RIF 0x0000          : 1
[MinoltaRaw]    0x0001 Saturation                      : 0
[MinoltaRaw]    0x0002 Contrast                        : 0
[MinoltaRaw]    0x0003 Sharpness                       : 0
[MinoltaRaw]    0x0004 WB Mode                         : Auto
[MinoltaRaw]    0x0005 Program Mode                    : Unknown (128)
[MinoltaRaw]    0x0007 Minolta Raw RIF 0x0007          : 64
[MinoltaRaw]    0x0008 Minolta Raw RIF 0x0008          : 0
[MinoltaRaw]    0x0009 Minolta Raw RIF 0x0009          : 0


i.e. Exiftool outputs various MRW or MinoltaRaw data.
If you don't get such output, maybe the files have been edited, which often corrupts the makernotes.

StarGeek

Quote from: drcq on June 08, 2020, 12:11:25 PM
Yes, as shown above the -u option is set.

Ah, yes, somehow I missed it when I looked at your command.

This would be a question Phil will have to answer.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

Hi Christoph,

Quote from: drcq on June 08, 2020, 12:11:25 PM
I checked the binary files for the Sony ARW images and find out, that the IDC dictionary is always located 6 bytes behind the offset value from the IDC_IFD (0x7240) tag. This is probably the problem of the exiftool, that at the specified offset no dictionary is located. I checked it for ca. 20 different types of Sony cameras and all of them need this additional offset shift of 6 bytes. Seems to be a small bug in the exiftool.

No.  At the specified offset there is an empty IFD for files straight from the camera (ie. 6 bytes, all zero).  The IFD you are looking at that comes after 6 bytes is the SubIFD.  Take a look at the -htmldump output to see this.  The IDC_IFD is only populated if the image was edited using Sony software.

But I'll improve the -v option to read this:

  | | + [SonyIDC directory with 0 entries]

- 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 ($).

drcq

Hi Phil,

you right I oversee that this 6 bytes shifts to SubIFD content. What about the MRWInfo? I have Sony 7RM3 and don't see such data as in the A700 example.
Do you have an idea how to get these data or what is the meaning of this data?

- Christoph

Phil Harvey

Yes, it seems as if Sony has changed the format of the data stored in what was previously the MRWInfo tag.  I don't know how to decode the new data.

- 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 ($).

JosR

Only the early Sony models used these MRWInfo / Minolta Raw tags.
I think that with the change to ARW 2.2 in 2010 with the NEX-3/5 and A33/A55V/A560/A580, these tags became obsolete.
At least I don't think I have seen any meaningful MRWINFO data for any of the models released since then.

Meaningful IDC data will only be present if an ARW image has been edited by the Sony Image Data Converter software.

drcq

Thanks for your support!

I edited few ARW images with the Sony Imaging Edge Software and now the IDC2 contains 3 entries (0xd000 - CurrentVersion, 0xd001 - VersionIFD and 0xd002). VersionIFD tag contains two offsets to IDC subDirectories (Version-0 and Version-1).