Aspose.Imaging Exif Data Read/Write Issue

I am trying to ready and write exif data to an image as part of a simple image capture application and am not even able to read the basic exif data of an image with valid exif data. I have followed the docs on how to read & write and no mater what I do my "exif" object is always Nothing. My code is below which is based on the sample provides in the documentation. I can view the exif data in any number of exif apps or browser plugins but not with the Aspose.Imaging library which I purchased recently.

Any help would be much appreciated.

Andrew

My Code:

Dim license As Aspose.Imaging.License = New Aspose.Imaging.License()
license.SetLicense("Aspose.Imaging.lic")

Using image As Aspose.Imaging.Image = Aspose.Imaging.Image.Load("C:\data\IMG_6902.JPG")
Dim exif As Aspose.Imaging.Exif.ExifData = TryCast(image, Aspose.Imaging.FileFormats.Jpeg.JpegImage).ExifData

If exif IsNot Nothing Then
MsgBox(exif.ISOSpeed)
End If

End Using

Hi Andrew,


Thank you for contacting Aspose support.

We have evaluated your presented scenario on our end while using the latest version of Aspose.Imaging for .NET 2.4.0 and below provided piece of code. Please note, we haven’t found any problems reading the EXIF information from a sample of our own. The problem could be the sample it self or your current version of the API, therefore we would request you to please give the latest version (link shared above) a try on your end. In case the problem persists, please provide us the sample image for our review.

Visual Basic

'Load an image using the factory method Load exposed by Image class
Using image As Aspose.Imaging.Image = Aspose.Imaging.Image.Load(myDir & “ExifDataSample-ricoh-rdc5300.jpg”)
'Initialize an object of ExifData and fill it will image’s EXIF information
Dim exif As Aspose.Imaging.Exif.ExifData = (TryCast(image, Aspose.Imaging.FileFormats.Jpeg.JpegImage)).ExifData
'Check if image has any EXIF entries defined
If exif IsNot Nothing Then
'Display a few EXIF entries
Console.WriteLine("Exif WhiteBalance: " & exif.WhiteBalance)
Console.WriteLine("Exif PixelXDimension: " & exif.PixelXDimension)
Console.WriteLine("Exif PixelYDimension: " & exif.PixelYDimension)
Console.WriteLine("Exif ISOSpeed: " & exif.ISOSpeed)
Console.WriteLine("Exif FocalLength: " & exif.FocalLength)
End If
End Using

Thank you for the quick reply.

I am currently using the latest version 2.4 of the Aspose.Imaging api and have tried several images all with the same result. I have also created a jpg file from scratch with the same result.

My environment is Windows 8.1 Update 2 x64, Visual Studio 2013.

Any further assistance would be great.

Andrew

Hi Andrew,


We have evaluated the presented scenario on Windows 7 Home Premium 64-bit edition, with Visual Studio 2013, Aspose.Imaging for .NET assembly from net2.0 folder & target framework 2.0.

Please spare us little time to simulate your environment by creating a VM of Windows 8. In the meanwhile, could you please check the attached image that we have used on our end for testing purposes, and see if you can read the EXIF information on your side. Please also provide a problematic sample from your spool as well, so we could review it.

Thanks in advance.

Thanks for the test image.


I used it and it worked perfectly. I tried others files and they didn’t work. So i tried more and it was hit and miss with image, some worked other didn’t. Could not put my finger on a specific reason.

I have sent you a private msg with a few sample images for you to test with. I do not think it is environment related but can’t be sure.

Hopefully the images may assist in locating the issue.

Many thanks for your assistance.

Andrew

Hi Andrew,


Thank you for writing back.

As you have narrated it, the problem seems to be related to the sample itself, not the environment. Please note, the image I have shared before has came directly from the camera without any modifications or processing. There are chances that EXIF information may get corrupted when you process the image further.

Anyway, I haven’t still got your sample, so could you please send it again. Please use the contact button on the post windows, and select “send babar.raza an email”. I will inform you once the samples are received.

I have sent you an email as requested.


Andrew

Hi Andrew,


Thank you for providing the samples for our testing.

We have found that among 4 sample images, only one image (IMG_6902.JPG) has the EXIF information, and Aspose.Imaging for .NET API was unable to extract it. For further investigation and correction purposes, we have logged a ticket (IMAGING-34141) in our bug tracking system. Please spare us little time to properly analyze the problem cause, and to provide a fix at earliest. In the meanwhile, we will keep you posted with updates in this regard.

Other sample image (Photo 5-11-2013 12 00 11.jpg, test_image.jpg, test_image_1.jpg) do not have any EXIF information embedded in them. We have verified through IrfanView (Image->Information) and by simply checking the image properties (right clicking the image file and select properties). In case you are using any other tool that shows the EXIF information in aforesaid images then please share the tool details (most preferably the download/documentation link) so we could re-evaluate the problem on our end.

The issues you have found earlier (filed as IMAGING-34141) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.