A bug form the function 'RemoveGpsLocation'


#1
We have applied the "GroupDocs.Metadata" to our software. But it have a bug, we found if we use the function 'RemoveGpsLocation' to remove the .jpeg file's GPS data, and stores file content to the specific path, the XMP metadata will miss.
We have writed the test codes to get the XMP metadata.
The attachment contains the source file, result file, test codes and the result of the test codes.

#2

@ida.luxia,


We are sorry to hear that you are facing such an issue. We will check it and return to you with the results.

Sorry for the inconvenience.

#3

@ida.luxia,

We are really glad to inform you that the issue you pointed out related to the function “RemoveGpsLocation” has been fixed in the latest version i-e version 17.8.0 of the GroupDocs.Metadata for .NET API. Kindly download the latest package and try out the following sample code to see how to use the function “RemoveGpsLocation” to remove the .jpeg file’s GPS data without losing its XMP metadata.

Example of using the function:


// path to the jpg file

string path = @“C:\example.jpg”;


// initialize JpegFormat

JpegFormat jpegFormat = new JpegFormat(path);


// check if JPEG contains XMP metadata

if (jpegFormat.HasXmp)

{

// remove GPS location

jpegFormat.RemoveGpsLocation();


// update Dublin Core format in XMP

jpegFormat.XmpValues.Schemes.DublinCore.Format = “image/jpeg”;


// and commit changes

jpegFormat.Save();

}

Please let us know if this solves your issue. Looking forward to your response.