wijesena#1191
I tried to run the following code which is available in the site.
The code did run with out any problem and I can also open the created image using sample metadata application comes with the library.
But when I tried to open it with Photoshop I got the following error.
“unexpected end-of-file was encountered”
When I commented out metadata writing sections all seems to work fine.
It is very strange why the images can not be open with photoshop.
I would appriceate any advice on this matter.
The code did run with out any problem and I can also open the created image using sample metadata application comes with the library.
But when I tried to open it with Photoshop I got the following error.
“unexpected end-of-file was encountered”
When I commented out metadata writing sections all seems to work fine.
It is very strange why the images can not be open with photoshop.
I would appriceate any advice on this matter.
using (Aurigma.GraphicsMill.Bitmap bitmap =
new Aurigma.GraphicsMill.Bitmap(@"C:\Temp\zion-maple-1.jpg"))
{
Aurigma.GraphicsMill.Codecs.JpegEncoderOptions encoderOptions =
new Aurigma.GraphicsMill.Codecs.JpegEncoderOptions(100, false);
//EXIF
Aurigma.GraphicsMill.Codecs.ExifDictionary exif =
new Aurigma.GraphicsMill.Codecs.ExifDictionary();
exif[Aurigma.GraphicsMill.Codecs.ExifDictionary.Software] = "Aurigma Graphics Mill";
encoderOptions.Exif = exif;
//IPTC
Aurigma.GraphicsMill.Codecs.IptcDictionary iptc =
new Aurigma.GraphicsMill.Codecs.IptcDictionary();
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Category] = "Nature";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.CopyrightNotice] = "Aurigma Inc.";
iptc[Aurigma.GraphicsMill.Codecs.IptcDictionary.Keyword] = "mountain";
encoderOptions.Iptc = iptc;
bitmap.Save(@"C:\Mountain2.jpg", encoderOptions);
}