Pinta eats-up all metadata after saving JPEG file

Bug #1084236 reported by grofaty
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Pinta
Confirmed
Medium
Unassigned
pinta (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

Using pinta-1.5-preview-20121121 on Windows XP. On Pinta ideas web page there is problem with EXIF data mentioned. I have manage to reproduce the problem:
1. Create some image with camera (I created it with my very old phone) and copy it to computer, name it before_pinta.jpg
2. Copy image with operating system tool and name copied image after_pinta.jpg.
3. Open after_pinta.jpg with Pinta mark some area with Rectangle Select and crop selection.
4. Save the file with File | Save or CTRL+S.
5. Install some program that can read EXIF data from JPEG file like "Exifer for Windows" - Download button is at the bottom of web page http://www.friedemann-schmidt.com/software/exifer/
6. Start Exifer for Windows and open

Revision history for this message
grofaty (grofaty) wrote :
Revision history for this message
grofaty (grofaty) wrote :
Revision history for this message
grofaty (grofaty) wrote :
Revision history for this message
grofaty (grofaty) wrote :

Just a note I have tested the same problem with Gimp 2.8.2 on Windows XP and Gimp does not eat-up EXIF data.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu:
status: New → Confirmed
Robert Roth (evfool)
affects: ubuntu → pinta (Ubuntu)
Changed in pinta:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Alan Pater (alan-pater) wrote :

I use pinta on Ubuntu Linux and the same problem exists. I notice that it not just EXIF data, but all metadata stored in the photo.

I tested with a Sample image containing a large amount of metadata: EXIF, IPTC and XMP. In my case I simply used Pinta to rotate the photo 90 degrees and then re-saved it. All the metadata was lost in the process.

To confirm that the metadata was not in the resulting image I tested with several tools: EoG and exiftool,

Revision history for this message
Alan Pater (alan-pater) wrote :
summary: - Pinta eats-up EXIF data after saving JPEG file
+ Pinta eats-up all metadata after saving JPEG file
Revision history for this message
Alan Pater (alan-pater) wrote :

Re-tested with Pinta 1.6 from the Pinta Daily PPA.

The same problem occurs. Data is lost from the image when rotating 90 degrees and re-saving.

Revision history for this message
Alan Horkan (horkana) wrote :

I'm not an expert but I've spent some time looking at the code for file formats in Pinta. What seems to happen with every type of image is that it is imported into memory and then exported, in effect creating a whole new image. Extra information like metadata gets lost along the way (for PNG, JPEG, and any other format).

The technology used underneath is from GTK, the GDK (drawing layer of GTK) and GdkPixbuf.
https://developer.gnome.org/gdk-pixbuf/unstable/gdk-pixbuf-The-GdkPixbuf-Structure.html
If I'm reading the documentation right GdkPixbuf only reads a very limited bit of metadata, enough to check the image orientation. The advantage of GdkPixbuf is that it is (relatively) simple, which is also the disadvantage. To avoid losing metadata such as Exif or XMP the code would need to get more complicated.

As a workaround you might be able using external tools to copy the exif from your original image to new image created by Pinta.

Rolf Leggewie (r0lf)
Changed in pinta (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Alan Pater (alan-pater) wrote :

Well, with exiv2 one can export all metadata to external files and then re-import the data after modifying the image in Pinta.

Automating that would be best, let's make the computers do all the work for us!

Revision history for this message
Yamin Bismilla (yaminb) wrote :

Defintely agree on automating this.
It's always a challenge decided which library to choose.
I would hope that is a .NET one which would make it easy for portability.

A quick google came up with this: https://github.com/oozcitak/exiflibrary/

Revision history for this message
Cameron White (cameronwhite91) wrote :

If a new library is required, that would be better suited for the GTK3 / .NET5 branch of Pinta (https://github.com/PintaProject/Pinta/tree/gtk3-v2).
Ideally we could load the metadata at the same time as the image data ..

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.