Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
Hi, all. Is it possible to read metadata from ARW (Sony RAW format) and Cr2 format? Regards, Carsten
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hi Carsten, Did you try RawReader? If it does not work, please create a support ticket and send us few examples, we will check it out. Also, if you need other metadata than EXIF (e.g. some RAW-specific data), please describe it as well. Edited by user Thursday, December 12, 2013 6:08:43 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
RawReader works. But Graphic Mill recognize FileFormat.Tiff...:-( I sent you an email with the attached image. Regards, Carsten
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Well, the reason is that RAW format is based on TIFF. Do you need to distinguish RAW and TIFF without loading it into memory?
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
What do you mean? I only want to extract all metadata of the files. :-)
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Carsten, Ok, could you post here a code snippet you use to load EXIF from such files?
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
Of course: Code: var properties = new List<MetaDataItem>();
using (var reader = new RawReader(s))
{
if (reader.Exif == null)
{
properties.Add(new MetaDataItem("", "The image does not have EXIF data", ""));
return properties;
}
ExifDictionary exifData = reader.Exif;
/* You can leave this out. Already discussed in other case...;-)
string strLatitude = exifData.GetItemString(ExifDictionary.GpsLatitude);
string strLongitude = exifData.GetItemString(ExifDictionary.GpsLongitude);
string strLatitudeRef = exifData.GetItemString(ExifDictionary.GpsLatitudeRef);
string strLongitudeRef = exifData.GetItemString(ExifDictionary.GpsLongitudeRef);
string latitudeValue = ConvertDegree(strLatitude, strLatitudeRef);
string longitudeValue = ConvertDegree(strLongitude, strLongitudeRef);
item.GpsData = new string[]
{
latitudeValue,
longitudeValue
};
*/
foreach (object key in exifData.Keys)
{
string tag = string.Format("{0:X}", key);
string name = exifData.GetKeyDescription(key);
string value = (ShrinkString(exifData.GetItemString(key), 50));
properties.Add(new MetaDataItem(tag, name, value));
}
}
Edited by moderator Tuesday, January 21, 2014 4:32:21 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
MetaDataItem Class: Code: [Serializable()]
public class MetaDataItem
{
public string Tag { get; set; }
public string Description { get; set; }
public string Value { get; set; }
public MetaDataItem(string t, string d, string v)
{
Tag = t;
Description = d;
Value = v;
}
}
Edited by moderator Tuesday, January 21, 2014 4:31:24 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
If s is a RAW file name, it should work fine. Where do you receive FileFormat.Tiff?
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
"s" is a Stream. Before the above code I make following if statement: Code: FileFormat format = ImageReader.RecognizeFormat(s);
if (format == FileFormat.Raw || format == FileFormat.Tiff)
Edited by moderator Tuesday, January 21, 2014 4:32:45 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Guest
Joined: 12/6/2013(UTC) Posts: 7
|
BTW: which translations do you mean in the support case?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 8/3/2003(UTC) Posts: 1,070
Thanks: 1 times Was thanked: 12 time(s) in 12 post(s)
|
Hello, We will take a look at this problem at the beginning of 2014 and hopefully the fix will be included in version 7 which will be available in 2014Q1. |
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.