I am trying to update the EXIF GPS data for a series of jpg images but am getting an error in Visual Studio when trying to access the ExifDictionary using []. My code is copied directly from the sample in the on-line help:
1. using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(imageFullPath)) {
2. using (Aurigma.GraphicsMill.Codecs.JpegWriter writer = new Aurigma.GraphicsMill.Codecs.JpegWriter(imageFullPath)) {
3. Aurigma.GraphicsMill.Codecs.ExifDictionary exif = new Aurigma.GraphicsMill.Codecs.ExifDictionary();
4. exif[Aurigma.GraphicsMill.Codecs.ExifDictionary.GpsLatitude] = latitudeAsExifString;
5. writer.Exif = exif;
}
}
I get the following error on line 4:
Error 1 Cannot apply indexing with [] to an expression of type 'Aurigma.GraphicsMill.Codecs.ExifDictionary' C:\Users\Mike Mason\Documents\My Dropbox\Development\KMLMerge\KMLMerge\Form1.cs 42 13 KMLMerge[/size]
and another error on line 5:
Error 2 'Aurigma.GraphicsMill.Codecs.JpegWriter' does not contain a definition for 'Exif' and no extension method 'Exif' accepting a first argument of type 'Aurigma.GraphicsMill.Codecs.JpegWriter' could be found (are you missing a using directive or an assembly reference?) C:\Users\Mike Mason\Documents\My Dropbox\Development\KMLMerge\KMLMerge\Form1.cs 43 15 KMLMerge
I suspect it is my lack of C# experience coming into play here but as the code is pretty much a copy of the on-line help perhaps it is something else.
Any help would be appreciated,
Mike
Using VS2008, and Graphics Mill 5.1
1. using (Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(imageFullPath)) {
2. using (Aurigma.GraphicsMill.Codecs.JpegWriter writer = new Aurigma.GraphicsMill.Codecs.JpegWriter(imageFullPath)) {
3. Aurigma.GraphicsMill.Codecs.ExifDictionary exif = new Aurigma.GraphicsMill.Codecs.ExifDictionary();
4. exif[Aurigma.GraphicsMill.Codecs.ExifDictionary.GpsLatitude] = latitudeAsExifString;
5. writer.Exif = exif;
}
}
I get the following error on line 4:
Error 1 Cannot apply indexing with [] to an expression of type 'Aurigma.GraphicsMill.Codecs.ExifDictionary' C:\Users\Mike Mason\Documents\My Dropbox\Development\KMLMerge\KMLMerge\Form1.cs 42 13 KMLMerge[/size]
and another error on line 5:
Error 2 'Aurigma.GraphicsMill.Codecs.JpegWriter' does not contain a definition for 'Exif' and no extension method 'Exif' accepting a first argument of type 'Aurigma.GraphicsMill.Codecs.JpegWriter' could be found (are you missing a using directive or an assembly reference?) C:\Users\Mike Mason\Documents\My Dropbox\Development\KMLMerge\KMLMerge\Form1.cs 43 15 KMLMerge
I suspect it is my lack of C# experience coming into play here but as the code is pretty much a copy of the on-line help perhaps it is something else.
Any help would be appreciated,
Mike
Using VS2008, and Graphics Mill 5.1