Which conversion route from SVG to JPG is best?

Asked by Robin

Hi,

Is there a difference in the quality of JPEG output obtained using different routes from Inkscape to GIMP? Generally I don't seem able to get very high quality JPEGs from my Inkscape drawings. :(

The alternatives I've found into GIMP are:

1. Export Bitmap (PNG) (this works every time)
2. Import directly as SVG (this works sometimes?)
3. Save As some other filetype ... XCF has been mentioned but I don't have that option listed.

Is the GIMP algorithm "good" at converting to JPEGs? I understand that different programs use different algorithms and I guess that also has an impact ...

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
sas
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
sas (sas-sas) said :
#1

I would start by exporting to PNG. You can convert this to JPEG using any of a number of different programs. The GIMP's JPEG output should be fine (with an appropriate choice of settings), but you could always try another converter (e.g., ImageMagick) and compare the results.

Images produced with Inkscape are often not suitable candidates for conversion to JPEG, however, since JPEG was designed for photographic images. If you're converting to JPEG in order to reduce the filesize (e.g., for web use), then you may get better results by dithering to 256 (or fewer) colours in the GIMP, saving as PNG, and then running through pngcrush.

Revision history for this message
Robin (talvenloppu) said :
#2

Wow thanks sas, the route you suggest is the one I've been using. I don't understand the JPEG settings in GIMP unfortunately, so I leave them as is :(

I use PNGs on my site, but sometimes sites don't accept uploads of anything other than JPEGs. Although I know something of the theory (JPEGs for photos, PNG and GIF for graphics?) I can't get the end quality to vary much between them.

I'll check out your idea of reducing dithering to 256 colours and also using pngcrush though. Thanks. (should this be closed or can I wait to see if anyone else inputs? I'm leaving it open because I don't know ...)

Revision history for this message
sas (sas-sas) said :
#3

The main JPEG setting in the GIMP is the "quality" one. If you increase this, you should get cleaner JPEG images (but larger files). If your only reason for using JPEG is because of a JPEG-only upload policy on some websites, then it might be best to use the maximum quality setting (and maybe set the subsampling to "1x1, 1x1, 1x1").

Revision history for this message
Robin (talvenloppu) said :
#4

Hi again Sas, thanks again, I'll follow that advice. I've been setting the quality to 100 (default seems to be 85) just in case it made a difference as I'm not that fussed about file size (at pres) But didn't see the 1x1 options!

Thanks :))

Revision history for this message
Robin (talvenloppu) said :
#5

Thanks sas, that solved my question.

Revision history for this message
Robin (talvenloppu) said :
#6

(Sorry, not sure how to handle this problem/solution approach to threads ...)

... in the Inkscape Preferences > Import/Export it's possible to set the DPI of the output file. Currently mine shows 90dpi. Is that optimal for quality - bearing in mind the ability to compress using other utilities as you mentioned?? (should this question be a new thread?...)

Revision history for this message
Best sas (sas-sas) said :
#7

That dpi setting doesn't have any effect on PNG quality, unless you let it. What I mean is: the dpi setting determines the width and height settings that you see when you open the Bitmap Export dialog - but you can ignore those width and height and set your own.

Revision history for this message
Robin (talvenloppu) said :
#8

Thanks sas, just wonering ... I select the stuff I want to export, tweak the height and width and then go for it. I seem to remember now rhat in the dialogue the dpi setting didn't seem to be able to be changed independently but seeing it in the transform preference made me wonder if I'd missed something. Thanks again :)

Revision history for this message
Robin (talvenloppu) said :
#9

Thanks sas, that solved my question.

Revision history for this message
ishmal (ishmalius) said :
#10

Actually, possibly much simpler than loading into another program and saving, get the ImageMagick tools. One of them, "convert," can transform any image to any other image.

convert source.png destination.jpg

done..