Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Carsten K.  
#1 Posted : Thursday, December 12, 2013 2:16:09 PM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
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

Andrew  
#2 Posted : Thursday, December 12, 2013 5:54:28 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
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

Carsten K.  
#3 Posted : Friday, December 13, 2013 12:26:40 AM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
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

Andrew  
#4 Posted : Friday, December 13, 2013 2:05:26 AM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
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?
Carsten K.  
#5 Posted : Friday, December 13, 2013 3:24:12 AM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
Joined: 12/6/2013(UTC)
Posts: 7

What do you mean? I only want to extract all metadata of the files. :-)
Andrew  
#6 Posted : Friday, December 13, 2013 3:30:03 AM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
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?

Carsten K.  
#7 Posted : Friday, December 13, 2013 3:46:45 AM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
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

Carsten K.  
#8 Posted : Friday, December 13, 2013 3:47:34 AM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
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

Andrew  
#9 Posted : Friday, December 13, 2013 7:01:49 AM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
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?
Carsten K.  
#10 Posted : Friday, December 13, 2013 7:50:16 AM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
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

Carsten K.  
#11 Posted : Friday, December 13, 2013 7:50:58 AM(UTC)
Carsten K.

Rank: Newbie

Groups: Member
Joined: 12/6/2013(UTC)
Posts: 7

BTW: which translations do you mean in the support case?
Dmitry  
#12 Posted : Monday, December 30, 2013 2:25:16 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
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.

Sincerely yours,

Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest
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.