Project

General

Profile

Writing to ARW files

Added by Kelvin Gardiner about 9 years ago

Hi,

I see from the man page that writing to a ARW file is not supported. Why is this? Is the information needed to try to hack a solution available somewhere?

Thanks.


Replies (3)

RE: Writing to ARW files - Added by Robin Mills about 9 years ago

According to WikiPedia (http://en.wikipedia.org/wiki/Raw_image_format), ARW is Sony's Raw Format and is based on TIFF. I downloaded a file and exiv2 was able to read the metadata. However there was an error message (reported on stderr). Will exiv2 damage AWR files? I don't know. Perhaps you could test this and let us know.

As for the reason it's not supported. It maybe that nobody has requested this! For sure, nobody has contributed a solution.

510 rmills@rmills-imac:~ $ curl http://www.rawsamples.ch/raws/sony/a100/RAW_SONY_A100.ARW > foo.arw

502 rmills@rmills-imac:~ $ exiv2 -pa foo.arw

Error: Directory SubImage1 with 6496 entries considered invalid; not read.

Exif.Image.NewSubfileType Long 1 Thumbnail/Preview image
Exif.Image.ImageWidth Long 1 3872
Exif.Image.ImageLength Long 1 2592
...
Exif.Sony1.SonyModelID Short 1 DSLR-A100
Exif.Sony1.ColorReproduction Ascii 9 None
...
Exif.Thumbnail.XResolution Rational 1 72
Exif.Thumbnail.YResolution Rational 1 72
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.DateTime Ascii 20 2007:04:08 17:41:18
Exif.Thumbnail.JPEGInterchangeFormat Long 1 55596
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 2774
503 rmills@rmills-imac:~ $ exiv2 -pa foo.arw > /dev/null
Error: Directory SubImage1 with 6496 entries considered invalid; not read.

507 rmills@rmills-imac:~ $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.7.4
BuildVersion: 11E53
508 rmills@rmills-imac:~ $

RE: Writing to ARW files - Added by Kelvin Gardiner about 9 years ago

I ran exiv2 -pa on a raw file from my Sony A100 (same as your example file) and get the same output with error message you do.

I then tried the same command on a raw file from my Sony A65 and get the metadata output but no error message. In both cases the raw file seems ok afterwards.

I have also tried copying metadata from a arw file from the a65 file to a dng file using the command:

exiv2 -S .ARW insert DSC01626.dng

This gives an error message:

Error: Directory Sony2 with 25665 entries considered invalid; not read.

However all the metadata seems to be copied across including the makernote which was missing from the dng file. In this experiment neither raw file had ITPC data.

Then I tried:

exiv2 -M "set Exif.Image.Software Ascii Worked" DSC01626test.ARW

This correctly wrote the string to the Exif data (the tag already existed).

So, can Exiv2 actual write to ARW files? Is the man page wrong. Does writing data need more testing?

RE: Writing to ARW files - Added by Robin Mills about 9 years ago

Thanks for doing this, Kevin. I think the man page is correct and we don't 'officially' support ARW. However ARW is close enough to TIFF that exiv2 operates successfully.

    (1-3/3)