I'm trying to create a PNG file that is 5000 x 5000 and 300 DPI?
Is it possible?
Any workaround?
How to create a PNG file (5000 x 5000 at 300 DPI)?
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
Hi Braznyc,
you can enter the pixel-size of the exported image in the dialog for exporting png images.
The 'resolution' displayed in the export dialog for a png image cannot be set independently from the pixel size in Inkscape.
This value is not saved as a property of the exported png image (I think that value defaults to 90dpi...?).
In reality, resolution is a function of the size in that you will print the image. Print a 5000x5000 image to a size of 16.666 inch to get a resolution of 300dpi. If you make your Inkscape document size 16.6666 inches wide and high, the value displayed in the export dialog will be approximately 300dpi.
The resolution value saved in the png file is just a hint for the next program that uses it for printing. It can be overridden by setting the print size manually in every case. It can also be set directly using a raster graphics editor, e.g. the Gimp (http://gimp.org) - but I'm not sure why that would be necessary.
you can enter the pixel-size of the exported image in the dialog for exporting png images.
The 'resolution' displayed in the export dialog for a png image cannot be set independently from the pixel size in Inkscape.
This value is not saved as a property of the exported png image (I think that value defaults to 90dpi...?).
In reality, resolution is a function of the size in that you will print the image. Print a 5000x5000 image to a size of 16.666 inch to get a resolution of 300dpi. If you make your Inkscape document size 16.6666 inches wide and high, the value displayed in the export dialog will be approximately 300dpi.
The resolution value saved in the png file is just a hint for the next program that uses it for printing. It can be overridden by setting the print size manually in every case. It can also be set directly using a raster graphics editor, e.g. the Gimp (http://gimp.org) - but I'm not sure why that would be necessary.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
Thanks.
Is there another vector program that can import the svg file (90dpi) created in Inkscape and save it as a 300 dpi png?
Is there another vector program that can import the svg file (90dpi) created in Inkscape and save it as a 300 dpi png?
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
SVG is a (basically) resolution-independent format. Only if you have raster images embedded in your drawing, dpi becomes /kind of/ relevant, because you don't want to print them blocky / pixelized.
I'm still not really sure I understand where the problem is exactly.
It would be helpful if you could give us more info about what you're actually trying to achieve and what your goal is, and what kind of data (vector? raster?) your file contains.
What do you need the 300 dpi png image for? How will it be used? Why does the embedded resolution value play any role at all?
I'm still not really sure I understand where the problem is exactly.
It would be helpful if you could give us more info about what you're actually trying to achieve and what your goal is, and what kind of data (vector? raster?) your file contains.
What do you need the 300 dpi png image for? How will it be used? Why does the embedded resolution value play any role at all?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
The problem is simple: I just wanted a 5000 x 5000 at 300 dpi PNG.
I can do that same thing on Gimp. I just don't understand why I can't export a svg file as a 300 dpi PNG.
Why a vector image that is made of equations instead of pixels needs to have a resolution of 90 dpi btw?
I can do that same thing on Gimp. I just don't understand why I can't export a svg file as a 300 dpi PNG.
Why a vector image that is made of equations instead of pixels needs to have a resolution of 90 dpi btw?
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
I've just re-checked the issue with my current Inkscape version.
It actually *does* set the correct resolution for me (used imagemagick's 'identify' command for this). I seem to remember this wasn't the case in previous Inkscape versions... (current is 0.91)
Output of an export at 600 dpi, A4, looks like this:
(multiply by 2.54 to get ppi)
The dpi value of a png image, if used for screen, is mostly irrelevant. If used for print, you will probably embed it into a DTP program like Scribus, where you can set the size of the image as you like. It might be useful if you import images into OfficeSuites or similar programs, so you do not need to resize the image there... but I still don't know why you need that exact value...
Inkscape needs a dpi value for embedding raster images (and I think for some patterns and filters, too, I'm not so sure about that, though).
It actually *does* set the correct resolution for me (used imagemagick's 'identify' command for this). I seem to remember this wasn't the case in previous Inkscape versions... (current is 0.91)
Output of an export at 600 dpi, A4, looks like this:
Code: Select all
Geometry: 4961x7016+0+0
Resolution: 236.22x236.22
Print size: 21.0016x29.7011
Units: PixelsPerCentimeter
(multiply by 2.54 to get ppi)
The dpi value of a png image, if used for screen, is mostly irrelevant. If used for print, you will probably embed it into a DTP program like Scribus, where you can set the size of the image as you like. It might be useful if you import images into OfficeSuites or similar programs, so you do not need to resize the image there... but I still don't know why you need that exact value...
Last edited by Moini on Sat Jan 30, 2016 11:53 am, edited 1 time in total.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
Off topic:
AFAIU Inkscape itself does not need it anywhere: Inkscape >= 0.91 optionally uses the image resolution - if provided in the image's metadata in a readable format - to determine the size (width, height attributes in SVG user units) of the SVG <image> element on import (this was added in Inkscape 0.91 due to popular demand by users).Moini wrote:Inkscape needs a dpi value for embedding raster images (and I think for some patterns and filters, too, I'm not so sure about that, though).
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
@~suv: thanks!
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to create a PNG file (5000 x 5000 at 300 DPI)?
Off topic:
Moini wrote:It actually *does* set the correct resolution for me (used imagemagick's 'identify' command for this). I seem to remember this wasn't the case in previous Inkscape versions... (current is 0.91)
Tested (on OS X 10.7.5) - exporting a filled, unstroked rectangle of 100x100px with 90dpi and 300dpi:
- Inkscape 0.47 r22583 (Nov 24 2009) (official OS X package)
- Inkscape 0.48.5 r10040 (Sep 21 2015) (local build)
- Inkscape 0.91 r13725 (Dec 17 2015) (local build)
- Inkscape 0.91+devel r14625 (Jan 29 2016) (local build)