Giter VIP home page Giter VIP logo

exiflibrary's Introduction

oozcitak's GitHub stats

Top Langs

exiflibrary's People

Contributors

arcanoxdragon avatar bugybunny avatar devedse avatar hgy59 avatar mattward-ideagen avatar oozcitak avatar panda7789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exiflibrary's Issues

Exception when reading file with dates set by the camera to Unknown

What steps will reproduce the problem?
1. Open a JPG file containing dates set to unknown ("0000:00:00 00:00:00) 
(DateTime, DateTimeDigitized, DateTimeOriginal (using ImageFile.FromFile

What is the expected output? What do you see instead?
Expect the file to open correctly, with dates set to Date.MinValue
Instead: Exception: {"Year, Month, and Day parameters describe an 
un-representable DateTime."}
"   at System.DateTime.DateToTicks(Int32 year, Int32 month, Int32 day)
   at System.DateTime..ctor(Int32 year, Int32 month, Int32 day, Int32 hour, Int32 minute, Int32 second)
   at ExifLibrary.ExifBitConverter.ToDateTime(Byte[] data, Boolean hastime)
   at ExifLibrary.ExifBitConverter.ToDateTime(Byte[] data)
   at ExifLibrary.ExifPropertyFactory.Get(UInt16 tag, UInt16 type, UInt32 count, Byte[] value, ByteOrder byteOrder, IFD ifd)
   at ExifLibrary.JPEGFile.ReadExifAPP1()
   at ExifLibrary.JPEGFile..ctor(Stream stream)
   at ExifLibrary.ImageFile.FromStream(Stream stream)
   at ExifLibrary.ImageFile.FromFile(String filename)

What version of the product are you using? On what operating system?
0.16. Did not occur in previous version (dated from January, sorry not sure 
which version number)

Is this issue specific to a certain image? If so, please attach the zipped
image. IMPORTANT: Please zip the image and attach the zip file to prevent
the image being re-encoded.


Please provide any additional information below.

Original issue reported on code.google.com by fraseco on 19 Oct 2011 at 3:12

Files with 2 APP1 sections

What steps will reproduce the problem?
1. In the file I attach to this request, there is 2 Sections APP1
2. I analyze the code but I can't see where you are looking in the second APP1 
section

Please provide any additional information below.
In the ReadExifAPP1 function you try to find the 1rst APP1 section by this line 
exifApp1 = Sections.Find(a => (a.Marker == JPEGMarker.APP1) &&
                a.Header.Length >= 6 &&
                (Encoding.ASCII.GetString(a.Header, 0, 6) == "Exif\0\0"));

I can't see if you try to retrieve the second section later.

Original issue reported on code.google.com by [email protected] on 26 Feb 2013 at 11:08

  • Merged into: #3

Attachments:

Method not found: Copy System.Array.

What steps will reproduce the problem?
1. "ImageFile file = ImageFile.FromFile(path);"

What is the expected output? What do you see instead?
"Method not found: Copy System.Array."

What version of the product are you using? On what operating system?
- Win 7 x64

Is this issue specific to a certain image? If so, please attach the zipped
image. IMPORTANT: Please zip the image and attach the zip file to prevent
the image being re-encoded.


Please provide any additional information below.
I´m programming an app for Windows Mobile 6 and want to edit EXIF Data but 
everytime at this code "ImageFile file = ImageFile.FromFile(path);" I got the 
message "ImageFile file = ImageFile.FromFile(path);" can you help me ?

Original issue reported on code.google.com by [email protected] on 16 Apr 2011 at 12:06

ExifFile.Read() Fails on some photos

What steps will reproduce the problem?
1.Execute ExifFile.Read("ExifTest.jpg");
2.
3.

What is the expected output? What do you see instead?
Every other app reads the Exif data (Windows,IrfanView,photoshop..)
I expect there is a corrupt tag

What version of the product are you using? On what operating system?
V9.0

Please provide any additional information below.
If you will provide the source I will be glad to debug the issue

Original issue reported on code.google.com by [email protected] on 31 Jan 2010 at 4:19

Attachments:

Reserve more place for tag modifications

It is not a bug, it is more an evolution.

I can't see in your code if you have reserved more place than necessary to 
store all the tag values.

My idea is to avoid to rewrite all the file every time I modify some tag 
values. 

In my application, I can add comment, author and GPS tag, and if I want to 
modify my comment or author, I thought it could be a good idea to have some 
place to modify this tags and not to rewrite all the image file. 
The first time, I need more place, the library allocates more place than 
necessary about 50 or 100 bytes and after, it is necessary to rewrite only the 
IFD to update the new tag values.

Do you think the EXIF format permit this evolution ? And if yes, do you think 
your implementation can do it ?

Thank you in advance.

Original issue reported on code.google.com by [email protected] on 17 Mar 2013 at 6:18

Read DNG files

Read metadata from DNG files.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:29

fraction conversions

* Posted by Chris on CP*

I think there is a Bug saving GPSLongitude:

If i save 51°45'2.48"N 5°52'52.80"E, it reads 51°45'2.48"N 5°52'9.85"E.

Many Thank's,

Chris

Original issue reported on code.google.com by oozcitak on 19 Jan 2010 at 9:19

ExifFile.Save gives NullPointerException on JPG having no APP1 block

What steps will reproduce the problem?
1. Open a JPG file with no APP1 block
2. Add an Exif key/value pair to the JPG
3. Try to use save method

What is the expected output? What do you see instead?
File should just save with with new APP1 block containing one key/value 
pair.  Instead, NullReferenceException occurs.

What version of the product are you using? On what operating system?
0.11 prealpha on Windows 7 using Visual Studio Express 10

Please provide any additional information below.
Only JPGs missing APP1 block fail.  Have found no other problems at this 
point.  Adding an Exif field, say through right-click properties editing 
on the Detail tab allows JPG to be processed by Exif library with no 
problems.

Original issue reported on code.google.com by [email protected] on 26 Apr 2010 at 1:07

System.ArgumentOutOfRangeException was unhandled (Year, Month, and Day parameters describe an un-representable DateTime.)

What steps will reproduce the problem?
1. Certain pictures throw this error when executing ExifFile.Read("MyImage")
2. One image attached, taken with a mobile phone
3.

What is the expected output? What do you see instead?
The date and time the image was taken.
Now the Read command fails and throws an error. It should catch the error and 
then continue to the next key instead of getting stuck and throwing an general 
error.

What version of the product are you using? On what operating system?
ExifLibrary version 0.14.0.0 on Win Xp Pro.
Image was taken with a mobile phone (see attachment)


Please provide any additional information below.
Most pictures go well, but sometimes ExifLibrary crashes on certain keys or 
values. It shoud just skip these and continue :)
Great tool btw!

Original issue reported on code.google.com by [email protected] on 18 Nov 2010 at 1:44

Attachments:

Read IPTC metadata

Read IPTC metadata from Photoshop APP13 header.

Original issue reported on code.google.com by oozcitak on 17 Nov 2009 at 9:57

Upgrade to .net core

Hi oozcitak, I saw you were working on this project recently and was wondering if you would like to include my Pull Request with an upgrade to .net Standard + automated builds.

This brings some advantages and allows the library to be used with .net Core and .net Framework.

DivisionByZero

DivisionByZero when i do a ExifFile.Read on a JPG file:

   bij ExifLibrary.MathEx.UFraction32.Reduce(UInt32& numerator, UInt32& denominator)
   bij ExifLibrary.MathEx.UFraction32.Set(UInt32 numerator, UInt32 denominator)
   bij ExifLibrary.ExifBitConverter.ToURationalArray(Byte[] data, Int32 count, ByteOrder frombyteorder)
   bij ExifLibrary.ExifPropertyFactory.Get(UInt16 tag, UInt16 type, UInt32 count, Byte[] value, ByteOrder byteOrder, IFD ifd)
   bij ExifLibrary.ExifFile.ReadExifAPP1()
   bij ExifLibrary.ExifFile.Read(Stream stream)
   bij ExifLibrary.ExifFile.Read(String filename)
   bij FSFTPSync.MainWindow.fileSystemWatcher_Created(Object sender, FileSystemEventArgs e) in D:\Mijn documenten\Development\VS2010\FSFTPSync\MainWindow.xaml.cs:regel 144

Original issue reported on code.google.com by [email protected] on 14 Dec 2010 at 2:04

Writing Thumbnails

* Posted by JochenK on CP *

I need create and write the Thumbnail to exif if no Thumbnail is included, 
and i'm confused after a few hours...i think i did something wrong, maybe 
you can help me.

I did this:

//Reading the source-file and the Thumbnail
ExifLibrary.ExifFile file = ExifLibrary.ExifFile.Read(filename);
ExifLibrary.JPEGFile tFile = file.Thumbnail;
//Check if a Thumbnail is already included. If not: create one and add...
if (tFile == null)
{
  //Create a new Bitmap from the source-File and scale it to 160Pixels 
(largest side)
  Image img = new Bitmap(filename);
  img = Tools.PictureTools.Resize((Bitmap)img, 160);
  //Save the smaller Bitmap as a jpg
  img.Save(@"D:\temp\testexifthumbnail.jpg", ImageFormat.Jpeg);
  //assign the jpg to the thumbnail. ...
  file.Thumbnail = new 
ExifLibrary.JPEGFile(@"D:\temp\testexifthumbnail.jpg");
  //...and save the modified source-file
  file.Save(filename + ".modified.jpg");
}

At first, everything seemes to work fine: the modified file ist about the 
size of the created thumbnail larger. But if i read the modified file 
again, no thumbnail can be exctracted.

Original issue reported on code.google.com by oozcitak on 6 Feb 2010 at 10:24

Infinite loop when reading certain JPEG image files

I have found (I think) a bug in JPEGFile.cs, 'Read' method. For the JPEGs from 
our digital camera, the first 'while (true)' loop after the comment "// Start 
of Scan (SOS) sections and RST sections are immediately followed by entropy 
coded data. For that, we need to read until the next section marker once we 
reach a SOS or RST." causes an infinite loop.

Original issue reported on code.google.com by [email protected] on 22 Aug 2010 at 6:32

Attachments:

ASCII Conversion

What steps will reproduce the problem?
1. Create a file with accentued characters like à é è ù ö for example with 
ExifTool from Phil Harvey
2. Open the file 
3. The "special" characters are not seen correctly

The problem is due to the way to Encode Strings. You are using ASCII Encoder 
(Encoding.ASCII) in place of more flexible one for example: 
Encoding.GetEncoding("Windows-1252")

Thank you for your work.

Original issue reported on code.google.com by [email protected] on 26 Feb 2013 at 10:40

Exif Tag UserComent not compatible with Windows 7 property editor

What steps will reproduce the problem?
1. Edit a comment from windows 7 property editor
2. Exif fails to read the UserComment
3. Write a UserComment, windows 7 does see it
4. At some point reading/writing UserComment and editing in windows 7 the 
Exif data become corrupt


Unhandled Exception: System.OverflowException: Arithmetic operation 
resulted in
an overflow.
   at ExifLibrary.ExifPropertyFactory.Get(UInt16 tag, UInt16 type, UInt32 
count,
 Byte[] value, ByteOrder byteOrder, IFD ifd)
   at ExifLibrary.ExifFile.ReadExifAPP1()
   at ExifLibrary.ExifFile.Read(String filename)
   at UtilApp.Program.Main(String[] args) in 
C:\Users\mike\VsProjects\UtilApp\Pr
ogram.cs:line 25
Press any key to continue . . .

















What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 17 Nov 2009 at 3:16

Two concerns

First of all, only several image format supported. Actually, as a 
photographer, we normally use the RAW instead of the JPEG..

Second, still very important information can't be obtained. Such as Lens 
information.


Original issue reported on code.google.com by [email protected] on 15 Apr 2010 at 2:30

Demo Project Crash

 Sir,:
      what's the use of "Embed Thumbnail", i just click and open a file
then get Error: 'Object reference not set to an instance of object'.



this is the stack race:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an 
object.
   at ExifLibrary.FormMain.embedThumbnailToolStripButton_Click(Object sender, EventArgs e) in E:\VB.net NEW CODES\00 GREAT RESOURCES\0 DOWNLOADS 2011\IMGLSV\EXIF\ExifLibrary_v0.16_prealpha_src\ExifTest\FormMain.cs:line 159
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
ExifTest
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///E:/VB.net%20NEW%20CODES/00%20GREAT%20RESOURCES/0%20DOWNLOADS%202011/IMGLSV/EXIF/ExifLibrary_v0.16_prealpha_src/ExifTest/bin/Debug/ExifTest.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
ExifLibrary
    Assembly Version: 0.16.0.0
    Win32 Version: 0.16.0.0
    CodeBase: file:///E:/VB.net%20NEW%20CODES/00%20GREAT%20RESOURCES/0%20DOWNLOADS%202011/IMGLSV/EXIF/ExifLibrary_v0.16_prealpha_src/ExifTest/bin/Debug/ExifLibrary.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Original issue reported on code.google.com by [email protected] on 26 May 2011 at 7:22

Platform endianness is not accounted for

Platform endianness is not accounted for if component count of a tag is more 
than 1.

Original issue reported on code.google.com by oozcitak on 1 Feb 2010 at 10:09

ExifFile.Read(stream) closes stream

What steps will reproduce the problem?
1. Read exif data from stream
2. After the exif data is used, the stream is closed

I would like the stream to stay open.
Version 0.11, OS: Windows 7 x64

Thanks for the great library.

Original issue reported on code.google.com by [email protected] on 17 Jun 2010 at 12:07

Adding tags to an image without tags throws an exception

Adding tags to an image without tags throws the following exception:

ExifLibrary.IFD0IsEmptyException: 0th IFD section cannot be empty.
at ExifLibrary.ExifFile.WriteApp1(Boolean preserveMakerNote)
at ExifLibrary.ExifFile.Save(String filename, Boolean preserveMakerNote)
at ExifLibrary.ExifFile.Save(String filename)
at Test.TestApp.Main(String[] args)

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 3:31

Embedded TIFF thumbnails

The current version of the library does not read or write uncompressed TIFF 
thumbnails.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:11

Problem saving and reading Windows related tags (e.g. Windows title)

What steps will reproduce the problem?
1.Using VB.net 4.0
2.code:
Dim file As ExifLibrary.ImageFile

file = ExifLibrary.ImageFile.FromFile(TextBox1.Text)

file.Properties.[Set](ExifTag.WindowsTitle, "A title", )

3.No data available visible when accessed from windows folder explorer and 
exifLibrary returns gibberish when reading data set by Windows explorer. 

Other tags such as GPS related, UserComment etc work perfectly


What is the expected output? What do you see instead?
The text "A title", but get gibberish

What version of the product are you using? On what operating system?
latest version on windows vista

Is this issue specific to a certain image? If so, please attach the zipped
image. IMPORTANT: Please zip the image and attach the zip file to prevent
the image being re-encoded.


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 27 Apr 2011 at 5:19

Library hang reading certain JPG files

What steps will reproduce the problem?

- Using the ExifTest file open the attached JPG the program will hang in the 
section JPEGFile.cs WriteIFD.


Application CPU usage and memory toggling.


Version is latest SVN copy r92


Is this issue specific to a certain image? Attached


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 15 Aug 2012 at 3:37

Attachments:

Read XMP APP1 header

Read and extract metadata from the Adobe XMP APP1 header.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:26

Can not clear properties

I create ImageFile object using:
ExifLibrary.ImageFile _file = ExifLibrary.ImageFile.FromFile(imgPath);

My Steps:
1. Clear Properties using _file.Properties.Clear();
2. Saving new image using _file.Save(newImgPath);

As i understand, it should clear the properties of old image and save as a new 
image. It works on my program. But when i look at image details on Windows 
Explorer Properties, the new image still contains the properties of old image.

Original issue reported on code.google.com by [email protected] on 13 Jun 2012 at 2:28

Question on recompression

When i use the library to modify EXIF data ("comment" for example) and save, 
does it recompress the picture?

Thanks
Filip

Original issue reported on code.google.com by [email protected] on 27 Aug 2013 at 4:06

Problems during ExifFile.Read when exif data has duplicate entries.

Hi,

I have attached sample image which demonstrates the problem with multiple 
same exif tags. The image was given at iPhone 3Gs. Each duplicate tags has 
same data.

To solve the problem i have simply change method 
ExifLibrary.ExifPropertyCollection.Add

        public void Add(ExifProperty item)
        {
            if(!items.ContainsKey(item.Tag))
                items.Add(item.Tag, item);
        }


Thanks for perfect library,

Best regards,
Vlad Mikheev

Original issue reported on code.google.com by [email protected] on 28 May 2010 at 9:18

Attachments:

Read GIF Files

Extract metadata from GIF files.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:32

usercomment trimmed

* Posted by Chris on CP*

Hi,
if i get the Usercomment from a Picture (v0.7), the text will be reduced by 
the first eight characters. 
In the Picture the text is stored in full.

String ^comment = file->Properties[ExifTag::UserComment]->Value-
>ToString();

My fault?

Thx 4 help,

Chris

Original issue reported on code.google.com by oozcitak on 19 Jan 2010 at 9:23

Cannot read large files

1.  Download sample images here:  
http://www.geospatialexperts.com/sampledata.php
2.  Open file in ExifTest


Should see preview of image, instead get this error:

Exception of type 'System.OutOfMemoryException' was thrown.

In this loop:

for (int i = 0; i < fillerbytecount; i++)
   stream.WriteByte(0xFF);


Original issue reported on code.google.com by [email protected] on 9 Jun 2011 at 3:18

Attachments:

more a question...

Hi there,
I was wondering if the Save method I use to save a ImageFile after modifying the tags could not save correctly ?
If my readings are correct, there are no exception thrown nor boolean value showing the process wasn't successfuly completed ?
Actually, I was looking to test the result of saving my file (in a kinda loop of n files) ?...

regards,

Error in procedure ExifBitConverter.ToDateTime

What steps will reproduce the problem?
1. Take a picture with iPaq 910i
2. Try load the image with the program example(Exif Test)
3. Crash the procedure ToDateTime in ExifBitConverter. The cast is invalid

This problem occurs if date or time has one only digit.

I expected the string date converted to DAteTime

I'm using Visual Studio 2008 on Windows XP SP3 with Comact Framewor 3.5 with 
SP1.

I supose that you can use "yyyy:M:dd HH:m:s" like format. I probed and it works.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 2 Jul 2010 at 10:48

Attachments:

Read TIFF files

Current release can read JPEG files only, extend to read TIFF files.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:28

Not a valid JPEG file

* Posted by chrishon on CP *

I want to add gps info in a JPEG image, which is Watermarked, but when i use 
"ExifFile.Read",it shows "Not a valid JPEG file",what should I do?

Original issue reported on code.google.com by oozcitak on 23 Aug 2010 at 7:59

Removing GPS Data From JPEG Images Written with the Library

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
GPS Image data remains in the image.  This only happens on images which have 
previously been encoded with GPS data from the library.  I wrote one utility to 
encode GPS data in images, and one utility to remove GPS data from images.  The 
removal tool works fine on outside images, but will not remove the GPS data 
from images encoded with the library.  I found a workaround which I will detail 
below.

What version of the product are you using? On what operating system?
version 0.18 on Windows Server 2008R2.  

Is this issue specific to a certain image? If so, please attach the zipped
image. Please take the time to do this; otherwise I may not be able to
reproduce the issue. IMPORTANT: Please zip the image and attach the zip
file to prevent
the image being re-encoded.


Please provide any additional information below.



The function being used to clear the GPS data is below, however on images 
encoded with the library, the output still contains GPS data:
private MemoryStream clearExif(Stream fileStream){
                ImageFile file = ImageFile.FromStream(fileStream);
                MemoryStream output = new MemoryStream();
                file.Properties.Remove(IFD.GPS);
                file.Save(output);
                return output;
            }

        }

If I go into JPEGFile.cs and modify this line by commenting out the return 
false, the GPS information is removed.  Once again, this is only necessary with 
images encoded using the library.  I will also attach one of the images:

            if (ifdzeroth.Count == 0 && ifdgps.Count == 0 && ifdinterop.Count == 0 && ifdfirst.Count == 0 && Thumbnail == null)
            {
                // Nothing to write
                //return false;
            }


Thanks for the great library !!

Original issue reported on code.google.com by [email protected] on 20 Jun 2013 at 11:06

Attachments:

Cannot write ExifTag.PixelXDimension or ExifTag.PixelYDimension

What steps will reproduce the problem?
1.exifFile.Properties[ExifTag.PixelXDimension].Value = Width;
2.exifFile.Properties[ExifTag.PixelYDimension].Value = Heighth;
3.

What is the expected output? What do you see instead?
Cast exception

What version of the product are you using? On what operating system?
V9.0/win7

Please provide any additional information below.
I tried using string, int, ushort, ushort[] none worked

Original issue reported on code.google.com by [email protected] on 31 Jan 2010 at 9:37

Cannot write EXIF

What steps will reproduce the problem?
1. Load original image
2. Draw sth on it drawellipse()etc...
3. Save EXIF ImageFile.Save(...) memory out of range

What is the expected output? What do you see instead?

Saved file, memory leak.

What version of the product are you using? On what operating system?

Current version, win7

Concerns each image.

Original issue reported on code.google.com by [email protected] on 21 Dec 2010 at 10:56

GPS info haven't been modified

* Posted by chrishon on CP *

I get the latest version from google code(v0.11).
ExifFile ef = ExifFile.Read("d:\\gpsphoto\\FP_IMAG0005.jpg");
ef.Properties[ExifTag.GPSLatitude] = new 
GPSLatitudeLongitude(ExifTag.GPSLatitude, 23.0f, 26.0f, 30.53f);
ef.Properties[ExifTag.GPSLatitudeRef] = new 
ExifEnumProperty<GPSLatitudeRef>(ExifTag.GPSLatitudeRef, GPSLatitudeRef.South);
ef.Properties[ExifTag.GPSLongitude] = new 
GPSLatitudeLongitude(ExifTag.GPSLongitude, 151.0f, 56.0f, 13.66f);
ef.Properties[ExifTag.GPSLongitudeRef] = new 
ExifEnumProperty<GPSLongitudeRef>(ExifTag.GPSLongitudeRef, 
GPSLongitudeRef.East);
ef.Save(Server.MapPath("/upload/" + DateTime.Now.ToString("yyMMddhhmmss") + 
".jpg"));
there is no error,but GPS info haven't been modified;

but,if change code:
ExifFile ef = ExifFile.Read("d:\\gpsphoto\\FP_IMAG0005.jpg");
ef.Properties.Clear();
...
GPS have been modified.

Original issue reported on code.google.com by oozcitak on 23 Aug 2010 at 7:58

Tiff files are corrupted

Tiff file saved by library is corrupted
because in TIFFFile.cs in Save method used hard coded ifdoffset 
Probably is better to use TIFFHeader.IFDOffset 

Original issue reported on code.google.com by [email protected] on 6 Sep 2011 at 11:09

Markernotes

In your Wiki you talk about marker notes.

But I can't see if your plug-ins architecture is working now.

I want to read some MakerNotes for Canon and Panasonic cameras to retrieve 
information about the burst mode for example.

How i s the best way to do it now ?

Thank you in advance

Original issue reported on code.google.com by [email protected] on 17 Mar 2013 at 6:21

Cannot Save Tiff Properties

ImageFile tif = ImageFile.FromFile(FI[j].FullName);

tif.Properties.Set(ExifTag.XResolution, 400);
tif.Properties.Set(ExifTag.YResolution, 400);

tif.Save(pathout + "\\" + FI[j].Name);

I tried to change Resolution of a Tiff image, but it's not effect.
It's original resolution is 300x300.
I used this code to change it's resolution to 400x400, but when i save it, it's 
resolution is still 300x300
Can you help me resolve it?

Original issue reported on code.google.com by [email protected] on 18 Jan 2014 at 3:20

Altitude tags

Altitude tags are missing:

* Original message from sdecorme at CP *

file.Properties[ExifTag.GPSAltitude] = new GPSAltitude (ExifTag.GPSAltitude, 
Altitude, 0, 0); // Don't work
or
file.Properties[ExifTag.GPSAltitude] = ExifEnumProperty <GPSAltitude> 
(ExifTag.GPSAltitude, Altitude, 0, 0);// Don't work too

Original issue reported on code.google.com by oozcitak on 21 Dec 2010 at 2:13

Read JFIF APP0 header

Read and extract metadata from the JFIF APP0 header.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:12

Read PNG files

Read metadata from PNG files.

Original issue reported on code.google.com by oozcitak on 13 Nov 2009 at 12:29

MathEx.UFraction32 from double endless loop

new MathEx.UFraction32(2.5252525252525E-16) finished in less than 2000 ms
new MathEx.UFraction32(2.5252525252525E-32) don't stop in 20 second
And any small numbers near zero get this result;



Original issue reported on code.google.com by [email protected] on 7 Feb 2012 at 9:37

Jpg-filename with multiple "."

What steps will reproduce the problem?
ExifFile file=ExifFile.Read("image.123.456.jpg")

What is the expected output? What do you see instead?
Cannot open file/read exif data

What version of the product are you using? On what operating system?
v0.13 prealpha, Windows 7 x64, Visual Basic 2008 Express Edition

Please provide any additional information below.
Reading exif orientation information in a large number of jpg's. Only files 
that cannot be processed [by exiflibrary] are the ones with multiple "." in the 
filename.

Original issue reported on code.google.com by [email protected] on 25 Aug 2010 at 6:32

ToImage() methods incorrectly dispose of underlying MemoryStream.

The following console application will throw a Generic GDI+ ExternalException.

using ExifLibrary;

namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            var file = ImageFile.FromFile(@"c:\file.jpg");
            var image = file.ToImage();
            image.Save(@"c:\crash.jpg");
        }
    }
}


The application should save the JPEG found a c:\file.jpg as a new image at 
c:\crash.jpg. 

Instead an ExternalExeption with the message "A generic error occurred in 
GDI+." is thrown.

This test is reproducible on Windows 8 RTM with .NET 4.5.

The issue is that the ToImage() methods are disposing of the MemoryStream that 
is passed to Image.FromStream. In the remarks for Image.FromStream it states 
"You must keep the stream open for the lifetime of the Image."

See http://msdn.microsoft.com/en-us/library/93z9ee4x.aspx


The fix is to remove the using() construct in the existing ToImage methods.
The existing methods look like this:

public override Image ToImage()
{
    using (MemoryStream stream = new MemoryStream())
    {
        Save(stream);
        return Image.FromStream(stream);
    }
}


I suggest the following change to prevent the bug being reinstated.

public override Image ToImage()
{
    // NOTE: It is an error to dispose of a stream when handing it to an Image
    // From: http://msdn.microsoft.com/en-us/library/93z9ee4x.aspx
    // 
    //     Remarks
    //         You must keep the stream open for the lifetime of the Image.
    // 
    // using (MemoryStream stream = new MemoryStream())
    // {
    MemoryStream stream = new MemoryStream();
    Save(stream);
    return Image.FromStream(stream);
    // }
}

Original issue reported on code.google.com by [email protected] on 21 Dec 2012 at 9:49

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.