Flickr Metadata Synchr v0.3.0.0

My app on CodePlex has reached the v0.3.0.0 stadium. It does not sync the metadata yet, but it fetches the metadata from images on Flickr and on a local disk in a form that can easily be compared.


Jan kindly donated some C# code using GDI+ and direct file operations for reading and writing EXIF and IPTC information. After digging deeper into the .NET 3.0 documentation, I found out that the Windows Imaging Component that is part of the .NET Framework 3.0 should allow me to do this as well. Because I need to display the images at some point using Windows Presentation Foundation, I would like to take as few dependencies on different image libraries as possible. Image files tend to get large (couple of MB) and it takes some time to read them into memory for processing. I hope to prevent the need for processing them using both WPF/WIC and GDI+ (the pre-WPF way on the Windows platform).

For instance, this is the code to read out the GPS longitude and latitude from a picture on disk:

         using (Stream pictureFileStream = new FileStream(pictureFilename, FileMode.Open, FileAccess.Read))
            JpegBitmapDecoder decoder = new JpegBitmapDecoder(pictureFileStream, BitmapCreateOptions.None, BitmapCacheOption.None);
            BitmapMetadata bitmapMetadata = (BitmapMetadata)decoder.Frames[0].Metadata;
            ulong[] latitudes = bitmapMetadata.GetQuery("/app1/ifd/gps/subifd:{ulong=2}") as ulong[];
            ulong[] longitudes = bitmapMetadata.GetQuery("/app1/ifd/gps/subifd:{ulong=4}") as ulong[];

It took me quite some time before I found the query strings for these metadata fields through trial-and-error. I could not find them documented anywhere in this form yet.

Unfortunately aiding someone else by testing his application, doing bug reporting and giving suggestions for improvements hasn't turned out to be reciprocal yet ;( So I am looking for other people who are willing to give my app a try and let me know what they think.

You can download the app in binary form from the release page and in source form as well.

The binary form is useful if you just want to look at the UI of the application. The source form is useful if you want to review the code and/or to run the program in the Visual Studio debugger so you can see the metadata that is fetched by setting breakpoints.

If you find any issues or have suggestions, the best way to give feedback is to add them to the Issue Tracker on CodePlex. That way they go directly into Team Foundation Server as work items. Releases and check-ins can be coupled to work items providing you with feedback on how issues are being tackled.

One thought on “Flickr Metadata Synchr v0.3.0.0

Leave a Reply

Your email address will not be published. Required fields are marked *