svg to png: bad quality

XnConvert Multi Platform - Windows, MacOSX, Linux

Moderators: XnTriq, helmut, xnview

Post Reply
H5T7P4
Posts: 17
Joined: Mon Apr 06, 2020 6:41 pm

svg to png: bad quality

Post by H5T7P4 »

Hello I converted svg files to png files with XnConvert. But the ouputed png files are very pixelated.
I tried the same with another graphics software and got pngs in good qualitiy, so the problem shouldn't be the svgs.

So what can the reason for the pixelated pngs and who can I solve the problem?
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: svg to png: bad quality

Post by cday »

H5T7P4 wrote: Wed Nov 25, 2020 9:03 pm Hello I converted svg files to png files with XnConvert. But the ouputed png files are very pixelated.
I tried the same with another graphics software and got pngs in good qualitiy, so the problem shouldn't be the svgs.

So what can the reason for the pixelated pngs and who can I solve the problem?
SVG is a vector file format, and while I haven't been able to determine whether opening files requires Ghostscript installed, you might pending a possibly better response at least check if increasing the DPI value in Settings > Load format settings... > PS/PDF tab -- Resolution improves the quality...
H5T7P4
Posts: 17
Joined: Mon Apr 06, 2020 6:41 pm

Re: svg to png: bad quality

Post by H5T7P4 »

I set resolution for PS/PDF from 72 dpi to 300 dpi. But that had no impact.
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: svg to png: bad quality

Post by cday »

Are you using Windows x64 and XnConvert x64?

I have very limited experience with SVG, but I have fired up my Windows PC and tested an example SVG file in XnView MP 0.96 x64, and it opens with reasonable image quality considering the small pixel dimensions. I've also discovered incidentally that it also opens in Linux 'MP 0.93.1 x64.

In both cases I believe the SVG plugin was included in the 'MP x64 download, however with some XnView software now available in x32 and x64 versions and cross-platform, compatibility of plugins is a potential issue when a plugin must be installed later. Normally x32 downloads require x32 plugins, and x64 downloads require x64 plugins.

Edit:

Realising that you were reporting poor image quality that could be due to incorrect pixel dimensions in the opened image, I thought to try opening the attached file in another nameless software and discovered that it opened with much better quality, at 450x450 versus 100x100 pixels.

So there does seem to be an anomaly in the way that SVG files are opened in XnView using the installed plugin... :bug: :?:

Bug reported in this XnView MP thread: Issue with viewing SVG files.

410 svg example.svg.zip
(396 Bytes) Downloaded 34 times
cday
XnThusiast
Posts: 3973
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: svg to png: bad quality

Post by cday »

Further edit:

It would seem from the linked thread above that SVG is a web image format, and that for the above attached file pixel dimensions of 100x100 are seemingly specified. It therefore seems likely that the 'poor quality' images you are encountering are similarly being viewed as intended in XnView software, however if needed you may nonetheless be able to view them at higher quality in another viewer.

On further investigation, SVG is evidently more than a vector image format, and the specification allows other forms of image content including bitmap content:

Wikipedia - Scalable Vector Graphics

It remains unexplained why the other software produces a significantly higher quality image with larger pixel dimensions... :?:
Post Reply