[direct edit] save strips valuable metadata
Submitted by Lucas Beeler
Assigned to cli..@..ba.org
Link to original bug (#718246)
Description
---- Reported by lucas@yorba.org 2011-10-12 16:43:00 -0700 ----
Original Redmine bug id: 4250
Original URL: http://redmine.yorba.org/issues/4250
Searchable id: yorba-bug-4250
Original author: Lucas Beeler
Original description:
From Alex Janssen on the mailing list:
I installed Shotwell 0.11.2, loaded an image,
cropped and adjusted saturation and saved it.
It deleted all of the camera information.
Actually, all it retained was the original
imaging date and time.
I have been able to reproduce this. If I simply open an image in direct-edit mode, correct its color balance using the Adjust palette, and then save it, most of the image's original metadata (including camera make, model, and lens information) is lost.
I've attached a sample image and before and after metadata printouts to demo this issue.
Since this involves losing potentially valuable user information, we should definitely attack this for 0.12.
---- Additional Comments From shotwell-maint@gnome.bugs 2013-05-01 11:38:00 -0700 ----
History
Comment 1
Updated by Lucas Beeler about 2 years ago
- Assignee set to Clinton Rogers
Comment 2
Updated by Clinton Rogers about 2 years ago
Further research reveals that, to trigger this problem, the user has to have actually modified the pixels in some way. Simply changing the orientation, then saving won't trigger it.
Comment 3
Updated by Clinton Rogers about 2 years ago
- File commitcand4250.diff added
- Status changed from Open to Review
- % Done changed from 0 to 70
Here's a patch that fixes this by grabbing the metadata before attempting to write the modified pixel data back out (which was originally clobbering the metadata before we got to it).
Tests:
Normal mode:
- Launch Shotwell with at least one image that contains known valid exif data in the library.
- Save the exif data from the image in step 1 to a file (can be done with the command `exiv2 /path/to/name_of_image.jpg > old.txt')
- Modify the colour of at least one pixel of the image from step one via Shotwell's editing tools.
- Export the image as modified in step three, choosing the current format and to export metadata (this should be on by default).
- Run an exif parser against the image exported in step 4 and compare the data displayed with the text file from step 2.
(They should be about the same, except for differences that would have been created by the edits (for example, cropping would change the width and height), but camera details should still be present. The 'Software' field will be different by design.)
Direct mode:
- Launch Shotwell with the path to and name of an image that contains known valid exif data (example: build_path/shotwell /path/to/my/image.jpg).
- Save the exif data from the image in step 1 to a file (can be done with the command `exiv2 /path/to/name_of_image.jpg > old.txt')
- Modify the colour of at least one pixel of the image from step one via Shotwell's editing tools.
- Attempt to close Shotwell.
- At the save prompt, choose 'Save'.
- Run an exif parser against the image saved in step 5 and compare the data displayed with the text file from step 2.
(They should be about the same, except for differences that would have been introduced by the edits (for example, cropping would change the width and height), but camera details should still be present. The 'Software' field will be different by design.)
Comment 4
Updated by Lucas Beeler about 2 years ago
- Status changed from Review to Open
Comment 5
Updated by Clinton Rogers about 2 years ago
- Status changed from Open to 5
- % Done changed from 70 to 100
- Resolution set to fixed
Comment 6
Updated by Charles Lindsay 7 months ago
- Status changed from 5 to Fixed
--- Bug imported by chaz@yorba.org 2013-11-25 21:55 UTC ---
This bug was previously known as bug 4250 at http://redmine.yorba.org/show_bug.cgi?id=4250 Imported an attachment (id=262265) Imported an attachment (id=262266) Imported an attachment (id=262267) Imported an attachment (id=262268)
Unknown Component Using default product and component set in Parameters Unknown milestone "unknown in product shotwell. Setting to default milestone for this product, "---". Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
Version: 0.12
Resolution: RESOLVED FIXED