Bug 1246666

Summary: pdftopng does not set resolution of png output file correctly
Product: [Fedora] Fedora Reporter: KevinFarshaw
Component: xpdfAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: tcallawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xpdf-3.04-11.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-07 13:03:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
FIX: Explicitly set output resolution of png file output none

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.