Closed GoogleCodeExporter closed 8 years ago
Can you show me some code? How do you load and modify the image, how do you
save it? Do you extract the Exif data before or after modifying?
Thanks,
Ozgur
Original comment by oozcitak
on 29 Dec 2010 at 4:11
Closing due to lack of feedback.
Original comment by oozcitak
on 25 Jan 2011 at 3:06
Sory for the lag, I had very little time recently and forgot about it.
I load file as Image , draw in it like:
g.DrawImage(map, location.X, location.Y, size.Width, size.Height);
save it via Image class.
Later open via ImageFile if = ImageFile.FromFile("same path as save");
if.Properties[ExifTag.GPSLongitude] = new GPSLatitudeLon,,,,,
if.save
Original comment by ole...@gmail.com
on 25 Jan 2011 at 3:14
Original comment by oozcitak
on 25 Jan 2011 at 6:43
I couldn't reproduce this. Here is what I tried:
using (Image image = Image.FromFile ("/home/ozgur/1.JPG"))
using (Graphics g = Graphics.FromImage (image)) {
g.DrawLine (Pens.Red, 0, 0, image.Width, image.Height);
image.Save ("/home/ozgur/2.JPG");
}
ImageFile exifimage = ImageFile.FromFile ("/home/ozgur/2.JPG");
exifimage.Properties[ExifTag.GPSLongitude] = new GPSLatitudeLongitude
(ExifTag.GPSLongitude, 1, 1, 1);
exifimage.Save ("/home/ozgur/3.JPG");
Original comment by oozcitak
on 23 May 2011 at 10:04
Got OutOfMemoryException - i need to copy metadata entries from one image to
another. My code is pretty simple:
ImageFile ExifFile = ImageFile.FromFile(InputFile);
ImageFile NewExifFile = ImageFile.FromFile(OutputFile);
if (ExifFile.Properties.Count > 0)
{
foreach (var Property in ExifFile.Properties)
{
NewExifFile.Properties.Add(Property);
}
}
Original comment by quadrop...@gmail.com
on 22 Aug 2011 at 11:10
Failure details:
JPEGFile.cs:878
for (int i = 0; i < fillerbytecount; i++)
stream.WriteByte(0xFF);
Stack trace:
in System.IO.MemoryStream.set_Capacity(Int32 value)
in System.IO.MemoryStream.EnsureCapacity(Int32 value)
in System.IO.MemoryStream.WriteByte(Byte value)
in ExifLibrary.JPEGFile.WriteIFD(MemoryStream stream, Dictionary`2 ifd, IFD ifdtype, Int64 tiffoffset, Boolean preserveMakerNote) in ...\JPEGFile.cs:878
in ExifLibrary.JPEGFile.WriteExifApp1(Boolean preserveMakerNote) in ...\JPEGFile.cs:728
in ExifLibrary.JPEGFile.Save(Stream stream, Boolean preserveMakerNote) in ...\JPEGFile.cs:190
in ExifLibrary.JPEGFile.Save(String filename, Boolean preserveMakerNote) in ...\JPEGFile.cs:239
in ExifLibrary.JPEGFile.Save(String filename) in ...
Original comment by quadrop...@gmail.com
on 22 Aug 2011 at 11:25
Hey, are you going to fix this bug?
Original comment by quadrop...@gmail.com
on 12 May 2012 at 8:46
Got the same error for trying to write the MakerNote (out of curiosity).
Original comment by felix.he...@gmail.com
on 17 Jun 2012 at 12:11
Fixed by r93.
Original comment by oozcitak
on 22 Aug 2012 at 12:05
Original issue reported on code.google.com by
ole...@gmail.com
on 21 Dec 2010 at 10:56