Bug 1246666 - pdftopng does not set resolution of png output file correctly
Summary: pdftopng does not set resolution of png output file correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xpdf
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-24 20:28 UTC by KevinFarshaw
Modified: 2015-08-07 13:16 UTC (History)
1 user (show)

Fixed In Version: xpdf-3.04-11.fc22
Clone Of:
Environment:
Last Closed: 2015-08-07 13:03:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
FIX: Explicitly set output resolution of png file output (754 bytes, patch)
2015-07-24 20:28 UTC, KevinFarshaw
no flags Details | Diff

Description KevinFarshaw 2015-07-24 20:28:50 UTC
Created attachment 1055882 [details]
FIX: Explicitly set output resolution of png file output

Description of problem:
Using pdftopng always results in a png file with a bogus resolution of 72ppi,
regardless of what resolution the user requeste, nor the default value of 150ppi,

Version-Release number of selected component (if applicable):
3.04

How reproducible:
Always

Steps to Reproduce:
1. Grab a pdf.
2. pdftopng -r 300 -f 1 -l 1 book.pdf out
3. identify -format "%xx%y %[units]"  -units pixelsperinch out-000001.png



Actual results:
ImageMagick reports the png file resolution as 72x72

Expected results:
ImageMagick should report the png file resolution to be 300x300.

Additional info:
pdftopng.cc:SetupPNG(...) does not try to set the resolution by
calling libpng's png_set_pHY()

*Patch included*

Comment 1 KevinFarshaw 2015-07-24 20:35:53 UTC
The garbage resolution data confuses Inkscape on import, resulting in erroneous page dimensions and screwing up the scale for measurements.

Comment 2 Fedora Update System 2015-07-27 18:58:31 UTC
xpdf-3.04-11.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/xpdf-3.04-11.fc22

Comment 3 Fedora Update System 2015-07-27 18:59:41 UTC
xpdf-3.04-11.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/xpdf-3.04-11.fc21

Comment 4 Fedora Update System 2015-07-30 00:47:08 UTC
Package xpdf-3.04-11.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xpdf-3.04-11.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-12094/xpdf-3.04-11.fc21
then log in and leave karma (feedback).

Comment 5 KevinFarshaw 2015-07-30 01:01:05 UTC
Done.

Comment 6 Fedora Update System 2015-08-07 13:03:39 UTC
xpdf-3.04-11.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2015-08-07 13:16:16 UTC
xpdf-3.04-11.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.