Density information not present in bitmap formats

Bug #484616 reported by Robert Ancell on 2009-11-18
50
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Simple Scan
Fix Released
Medium
Unassigned
3.12
Fix Released
Medium
Unassigned
3.14
Fix Released
Medium
Unassigned
3.4
Fix Committed
Medium
Unassigned
simple-scan (Ubuntu)
Medium
Unassigned
Trusty
Low
Unassigned
Utopic
Low
Unassigned
Vivid
Medium
Unassigned

Bug Description

The pixel density information is not stored in JPEG and PNG formats.

For JPEG:
http://en.wikipedia.org/wiki/JPEG_File_Interchange_Format

For PNG:
http://www.libpng.org/pub/png/spec/iso/index-object.html#11pHYs

Search Keywords: DPI Metadata

NOTE: This change only works if a sufficiently new GdkPixbuf is available, otherwise it has no effect (e.g. on Trusty).

Related branches

Changed in simple-scan:
status: New → Triaged
importance: Undecided → Low
Jeroen Hoek (mail-jeroenhoek) wrote :

The lack of pixel density information (usually DPI) is something that is quite noticeable in graphics manipulation software such as Inkscape and the GIMP, but also in other software that uses the DPI value to determine the size of the inserted graphic. Most software assumes 75 DPI if no value is set, making the scanned graphic four times wider and higher than the original when scanned at 300 DPI and inserted in a document.

Setting the pixel density value to the one used by the scanner seems like a very, and perhaps only, sensible default.

Robert Ancell (robert-ancell) wrote :

Joroen, absolutely - the density information should always be stored in the file, the issue is getting the APIs to write this information.

Victor Mireyev (victor-mireyev) wrote :

Simple Scan uses gdk-pixbuf library, which currently doesn't provide API for storing density info.
But libpng, libjpeg and libtiff, on top of which gdk-pixbuf is built, provide such API.
For example, there's png_set_pHYs(resolution_x, resolution_y) in libpng,
X_density and Y_density in jpeg_compress_struct,
XResolution and YResolution tags in libtiff are supported.

The question is: should it be considered gdk-pixbuf bug?
Or maybe it's better to use (or write from scratch) Vala API bindings for libpng, libjpeg and libtiff?

Robert Ancell (robert-ancell) wrote :

It's desirable to be fixed in gdk-pixbuf, but I'm open to patches to access libpng / libjpeg / libtiff directly if that's the direction we need to take.

Victor Mireyev (victor-mireyev) wrote :

There's upstream bug in bugzilla
https://bugzilla.gnome.org/show_bug.cgi?id=466372

Michael Nagel (nailor) wrote :

i just found https://code.launchpad.net/~victor-mireyev/simple-scan/484616
does that work? should it be merged?

Michael Nagel (nailor) on 2013-04-15
description: updated
Victor Mireyev (victor-mireyev) wrote :

Yes, it works for JPEG. I think it should be merged.

Changed in simple-scan:
assignee: nobody → Victor Mireyev (victor-mireyev)
status: Triaged → In Progress
Robert Ancell (robert-ancell) wrote :

The patches for this landed in gdk-pixbuf so this will now work with gdk-pixbuf 2.32.2

Changed in simple-scan:
milestone: none → 3.15.1
assignee: Victor Mireyev (victor-mireyev) → nobody
status: In Progress → Fix Committed
importance: Low → Medium
Changed in simple-scan:
milestone: 3.15.1 → 3.15.2
Robert Ancell (robert-ancell) wrote :

That should say gdk-pixbuf 2.31.2 (the next version to be released)

Changed in simple-scan:
status: Fix Committed → Fix Released
Robert Ancell (robert-ancell) wrote :

This change comes with a SRU for utopic. Note that there will be no behaviour change unless the change is SRU'd to gdk-pixbuf as well.

Changed in simple-scan (Ubuntu Vivid):
status: New → Fix Released
Changed in simple-scan (Ubuntu Utopic):
importance: Undecided → Low
Changed in simple-scan (Ubuntu Trusty):
importance: Undecided → Low
Changed in simple-scan (Ubuntu Vivid):
importance: Undecided → Medium

Hello Robert, or anyone else affected,

Accepted simple-scan into utopic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/simple-scan/3.14.3-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in simple-scan (Ubuntu Utopic):
status: New → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simple-scan - 3.14.3-0ubuntu1

---------------
simple-scan (3.14.3-0ubuntu1) utopic; urgency=medium

  * New upstream release:
    [ 3.14.3 ]
    - Fix logic for adding blank page on page removal. (LP: #1442596)
    - Fix save button being inactive on pages restored after a crash.
      (LP: #1435794)
    - Fix error where document was discarded if warning dialog was closed.
      (LP: #1386738)
    [ 3.14.2 ]
    - Store density information in bitmap formats (JPEG, PNG, TIFF). Requires
      gdk-pixbuf 2.32 (LP: #484616)
 -- Robert Ancell <email address hidden> Tue, 14 Apr 2015 12:03:37 +1200

Changed in simple-scan (Ubuntu Utopic):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for simple-scan has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in simple-scan (Ubuntu Trusty):
status: New → Triaged
description: updated
Brian Murray (brian-murray) wrote :

From what I can tell trusty doesn't have a version of libgdk-pixbuf2.0-0 (2.30.7-0ubuntu1.2 ) that will actually resolve this even if the fix is made to simple-scan. Is that correct?

Robert Ancell (robert-ancell) wrote :

Brian - yes this will have no effect on trusty unless someone updates gdk-pixbuf (I am not planning on doing that).

Hello Robert, or anyone else affected,

Accepted simple-scan into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/simple-scan/3.12.3-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in simple-scan (Ubuntu Trusty):
status: Triaged → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
tags: added: verification-done-trusty verification-done-utopic
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package simple-scan - 3.12.3-0ubuntu1

---------------
simple-scan (3.12.3-0ubuntu1) trusty; urgency=medium

  * New upstream bugfix release:
    [ 3.12.2 ]
    - Add non-standard option names for duplex scanning on HP And Brother
      scanners (LP: #1343773) (LP: #1353599)
    - Don't access a variable after ownership is transferred - was breaking
      scans (LP: #1334710)
    - Stop configure if Vala not found
    [ 3.12.3 ]
    - Correctly select the previous device after the device list is updated
      (LP: #1485977)
    - Fix error dialogs not showing.
    - Fix save button being inactive on pages restored after a crash
      (LP: #1435794)
    - Fix error where document was discarded if warning dialog was closed
      (LP: #1386738)
    - Store density information in bitmap formats (JPEG, PNG, TIFF). Requires
      gdk-pixbuf 2.32.2 (LP: #484616)

 -- Robert Ancell <email address hidden> Thu, 24 Mar 2016 11:44:22 +1300

Changed in simple-scan (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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