Export to PNG should set "Real World Dimensions" AKA --export-width shouldn't override --export-dpi

Bug #1418922 reported by p.tar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

When converting an SVG to a PNG file with Inkscape 0.91, it's not possible to define the "Real World Dimensions" of the resulting image, which a PNG is capable to store (see http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.pHYs) and which e.g. Word 2010 is using to size the image according to the page-size.

Example:
Let's say, the resulting image should have 300DPIs (or PPIs, if you like) and a real world dimension of 4cm in width.
That's a bitmap with about 472 pixels in width.

With
inkscape --export-dpi=300 --export-width=472 -f infile.svg -e outfile.png
the export-dpi is ignored.
The resulting PNG has 472 in width, but (for my example svg) it says, it has 88 DPI and a real world width of 13,6cm

Placing this image in Word places a 13,6cm wide image in the document.

You may use the command line above with other widths, but the resulting PNG will always have the same real world width of 13,6cm, just the DPI value will vary.

IMHO it's currently impossible to create a PNG for a given real world size with a given DPI.

Please fix this!

p.tar (dap-chnual)
description: updated
su_v (suv-lp)
tags: added: bitmap cli
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.