After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 517077 - After croping an image the exif data is not adjusted to reflect the new size
After croping an image the exif data is not adjusted to reflect the new size
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.4.x
Other All
: Normal normal
: 2.4
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2008-02-17 20:40 UTC by Serge Droz
Modified: 2008-10-30 20:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Serge Droz 2008-02-17 20:40:47 UTC
Please describe the problem:
Cropping an image and the saving it still keeps the old dimensions in the EXIF data. Cahnging (scaling) the image seems to remove the size information

Steps to reproduce:
1. Open any file containing size info in the exif data (Tags 0x0100 & 0x0101)
2. Crop a portion out
3. Save


Actual results:


Expected results:
Have the correct size info in the file

Does this happen every time?
Yes

Other information:
Comment 1 Martin Nordholts 2008-02-18 15:39:34 UTC
Could you please attach an image that can be used to reproduce the problem?
Comment 2 Serge Droz 2008-02-18 20:52:39 UTC
The image seems to big to upload as an attachment. 
So you can download it at

http://www.drozilla.ch/705a71a4.jpg

Please let me know, when you're done, so I can remove the link.

By teh way, this is running on an uptodate Fedora 8 System
Comment 3 weskaggs 2008-02-19 03:26:06 UTC
Two questions:  What tool are you using to tell you what is in the exif info?  And what version of libexif is installed on your system?
Comment 4 Sven Neumann 2008-02-19 08:16:34 UTC
This can be easily reproduced using the exif tool that comes with libexif version 0.6.15.
Comment 5 weskaggs 2008-02-19 17:35:03 UTC
Yeah, well, this is confusing stuff.  According to the EXIF specification, we are not supposed to set those tags for jpeg files, because the information is included in the jpeg marker.  Instead, the dimensions are supposed to go into the mandatory PixelXDimension and PixelYDimension fields (tags A002 and A003), which we do set correctly when we save an image, as far as I know.  Still, it's hard to see what harm it could do for us to set them.

Reference: http://www.exif.org/Exif2-2.PDF , pp 54-55.
Comment 6 Sven Neumann 2008-02-19 18:44:35 UTC
The reason I confirmed this bug is that PixelXDimension and PixelYDimension fields  are not updated correctly. For the other fields, we should of course adhere to the Exif specification.
Comment 7 weskaggs 2008-02-19 19:50:42 UTC
Ugh. The code was using the wrong IFD -- this has obviously been wrong forever.  Fixed now in trunk and gimp-2-4.

2008-02-19  Bill Skaggs  <weskaggs@primate.ucdavis.edu>

	* plug-ins/jpeg/jpeg-exif.c: correctly record dimensions when
	saving an image.  Fixes bug #517077.
	
Serge, thanks for the bug report.