goldengel / exiflibrary

Automatically exported from code.google.com/p/exiflibrary
MIT License
0 stars 0 forks source link

Jpg-filename with multiple "." #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
ExifFile file=ExifFile.Read("image.123.456.jpg")

What is the expected output? What do you see instead?
Cannot open file/read exif data

What version of the product are you using? On what operating system?
v0.13 prealpha, Windows 7 x64, Visual Basic 2008 Express Edition

Please provide any additional information below.
Reading exif orientation information in a large number of jpg's. Only files 
that cannot be processed [by exiflibrary] are the ones with multiple "." in the 
filename.

Original issue reported on code.google.com by widmer...@gmail.com on 25 Aug 2010 at 6:32

GoogleCodeExporter commented 8 years ago
Could you send me your code and an offending image? I renamed a jpg to what you 
wrote above and it works fine. Here is what I tried:

ExifFile file = ExifFile.Read(@"C:\Users\ozgur\Desktop\image.123.456.jpg");

Original comment by oozcitak on 25 Aug 2010 at 7:46

GoogleCodeExporter commented 8 years ago
Here's the code I'm using in VisualBasic - pic is also attached:

        Dim exif As ExifFile
        Dim i As Integer

        exif = ExifFile.Read("S:\Pictures\2010\2010-03 Photoshooting Migros\8919.005.10.1_001.jpg")
        i = exif.Properties(ExifLibrary.ExifTag.Orientation).Value
        exif = Nothing

Original comment by widmer...@gmail.com on 25 Aug 2010 at 7:19

Attachments:

GoogleCodeExporter commented 8 years ago
The image you sent me doesn't have an orientation tag. If an image doesn't have 
a tag, it will not be in the dictionary. The library doesn't create defaults 
for missing tags. You can something like this:

            Orientation orientation = Orientation.Normal;
            ExifEnumProperty<Orientation> o;
            if (file.Properties.TryGetValue(ExifTag.Orientation, out o))
                orientation = o.Value; 

This ensures you get a valid orientation regardless of the tag being present or 
not.

Thanks,
Ozgur

Original comment by oozcitak on 6 Oct 2010 at 7:17

GoogleCodeExporter commented 8 years ago

Original comment by oozcitak on 20 Nov 2010 at 1:19