Portable EXIF library for Windows 8, Windows Phone and Silverlight.
Based completely on ExifLib - A Fast Exif Data Extractor for .NET 2.0+ created by Simon McKenzie and released on Code Project under Code Project Open License.
Modified to take a stream in constructor and created as a portable library so it can easily be used in Windows Phone, Windows 8 and Silverlight projects.
var picker = new FileOpenPicker();
picker.SuggestedStartLocation = PickerLocationId.PicturesLibrary;
picker.ViewMode = PickerViewMode.Thumbnail;
picker.FileTypeFilter.Add(".jpg");
picker.FileTypeFilter.Add(".jpeg");
var file = await picker.PickSingleFileAsync();
var stream = await file.OpenAsync(FileAccessMode.Read);
var jpegInfo = ExifReader.ReadJpeg(stream.AsStream());
private void Button_Click(object sender, RoutedEventArgs e)
{
var task = new PhotoChooserTask();
task.Completed += task_Completed;
task.Show();
}
void task_Completed(object sender, PhotoResult e)
{
var jpeginfo = ExifReader.ReadJpeg(e.ChosenPhoto);
this.DataContext = jpeginfo;
}