convert svg to jpg
convert svg to jpg
Hi, I will try my best to explain in english...I am using Inkscape 0.92 on Windows Office 365 Home, cannot seem to find a way to convert a svg file to a jpg file. When I convert to png I loose some of the quality. Anyone knows a better way of converting? tnx
Re: convert svg to jpg
It's exactly the other way around: If you convert to jpg, you will lose quality, because jpg introduces artifacts, while png saves all the pixels losslessly.
You can change the dpi setting in the export dialog for png. File -> Export PNG Image -> Image size -> set the dpi value to something of at least 300. 600 is a typical value, too, or 1200 even, in some rare cases.
That said, there is an extension to export to jpg, if you really need it:
https://github.com/giacmir/Inkscape-JPE ... -extension
However, I'd suggest using PNG if what you want is quality.
You can change the dpi setting in the export dialog for png. File -> Export PNG Image -> Image size -> set the dpi value to something of at least 300. 600 is a typical value, too, or 1200 even, in some rare cases.
That said, there is an extension to export to jpg, if you really need it:
https://github.com/giacmir/Inkscape-JPE ... -extension
However, I'd suggest using PNG if what you want is quality.
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)
- flamingolady
- Posts: 687
- Joined: Wed Jun 10, 2009 1:40 pm
Re: convert svg to jpg
I agree with Moini that the png retains the better quality (which is why it is a larger file size).
Re exporting size: the larger dpi when exporting gives you a larger file, but not a higher resolution. There have been many debates over that issue. The 300 dpi is what is needed when printing, but when exporting the dpi size would be 96 (used to be 92) in order for the png to end up at the same 100% size that you exported from Inkscape. Now, for me, I have to send large files to my microstock sites, so for me, instead of the usual 96 size, I may need to choose 250 to get a big enough file to sell. So, bottom line, you have choices and need to know what your desired outcome is in order to choose the correct dpi for the png. (hope that makes sense, I'm not the best person in explaining technical things, but you can do a search on these forums and read some really good explanations on the threads....).
Anyway - I use GIMP to get the jpg and it works great; a lot of us use it, as it's open source. Basically I feel it works best to create/export your png, then open the png in GIMP. You then have to chose file/export within GIMP, being sure to change the file extension to a jpg. Also, be sure to click on advanced options, this lets you save a thumbnail, and you can choose to save as the best quality there too. I usually leave the other boxes as is. It will then create a beautiful jpg.
Re exporting size: the larger dpi when exporting gives you a larger file, but not a higher resolution. There have been many debates over that issue. The 300 dpi is what is needed when printing, but when exporting the dpi size would be 96 (used to be 92) in order for the png to end up at the same 100% size that you exported from Inkscape. Now, for me, I have to send large files to my microstock sites, so for me, instead of the usual 96 size, I may need to choose 250 to get a big enough file to sell. So, bottom line, you have choices and need to know what your desired outcome is in order to choose the correct dpi for the png. (hope that makes sense, I'm not the best person in explaining technical things, but you can do a search on these forums and read some really good explanations on the threads....).
Anyway - I use GIMP to get the jpg and it works great; a lot of us use it, as it's open source. Basically I feel it works best to create/export your png, then open the png in GIMP. You then have to chose file/export within GIMP, being sure to change the file extension to a jpg. Also, be sure to click on advanced options, this lets you save a thumbnail, and you can choose to save as the best quality there too. I usually leave the other boxes as is. It will then create a beautiful jpg.
Re: convert svg to jpg
The dpi value affects the number of dots per inch in a picture. This /is/ the value for the resolution of a picture. Changing it does not affect the exported PNG image's size in inches, if the program that reads the exported image is working correctly (many aren't, so that may be how you came to this conclusion).
In Gimp, check Image > Image properties to find the dpi value again.
In Gimp, check Image > Image properties to find the dpi value again.
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: convert svg to jpg
Hi @Gitte,
what is your final goal? Do you have a SVG file and want to import it into an MS Word document? Well, then you have to convert the SVG to something which MS Word can import. As @Moini and @flamingolady said, I also would go for PNG with high enough dpi.
As alternative solution: instead of MS Word, you could use LibreOffice Writer which can import SVG directly and you don't have to worry about any conversion and quality loss.
what is your final goal? Do you have a SVG file and want to import it into an MS Word document? Well, then you have to convert the SVG to something which MS Word can import. As @Moini and @flamingolady said, I also would go for PNG with high enough dpi.
As alternative solution: instead of MS Word, you could use LibreOffice Writer which can import SVG directly and you don't have to worry about any conversion and quality loss.
Win7/64, Inkscape 0.92.2
- flamingolady
- Posts: 687
- Joined: Wed Jun 10, 2009 1:40 pm
Re: convert svg to jpg
Moini - Maybe there are more technical terms, and I'm unable to explain it well, sorry about that (your explanation is so much better and clear).
There's size and there's 'size', so to speak (in my head anyway). If you hit the Export button, and then look under the Image Size, the size (width and height) DO get bigger when you put in say a 300 dpi, vs the 96.
It would help to know what the anticipated desired outcome is, whether it needs to be printed, or just viewed on a screen, etc. I am hoping that one day Inkscape will be able to convert JPGs so we won't have to export it. But that's after my wish for Inkscape's thumbnails to show a real preview of the drawing, lol.
There's size and there's 'size', so to speak (in my head anyway). If you hit the Export button, and then look under the Image Size, the size (width and height) DO get bigger when you put in say a 300 dpi, vs the 96.
It would help to know what the anticipated desired outcome is, whether it needs to be printed, or just viewed on a screen, etc. I am hoping that one day Inkscape will be able to convert JPGs so we won't have to export it. But that's after my wish for Inkscape's thumbnails to show a real preview of the drawing, lol.
Re: convert svg to jpg
Yes, the number of pixels increases with the dpi value. The number of inches does not. The number of kilobytes usually does. Inkscape can convert to JPG, if you use the correct extension: https://github.com/giacmir/Inkscape-JPE ... -extension
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)
- flamingolady
- Posts: 687
- Joined: Wed Jun 10, 2009 1:40 pm
Re: convert svg to jpg
Moini. Totally agree with what you said. thx for the link to that extension, will give that a try. I seem to lose extensions with uploads, so will wait until I upgrade to 92.2.
Re: convert svg to jpg
Hi.
A lot of the recommendations (some found here on the forum) on installing extensions tells you to install them in the Inkscape install directory.
For me this is not the best solution as the extensions will not "survive" an upgrade or re-install of Inkscape.
Extensions you download and extensions you want to stay permanent
should NOT be copied to the Inkscape Installation directory.
(on my Windows 10 machine: "C:\Graphics\Inkscape\share\extensions".
Your install might use "C:\Program Files" or "C:\Program Files (x86)"
instead of the "C:\Graphics" as on my system.)
Rather they should be copied to the user extension directory,
on my Windows10 machine: C:\Users\ragnar\AppData\Roaming\inkscape\extensions
The path to this directory can be found in the Inkscape preferences by
typing: Shift + Control + P and then click the "System" - The path will be listed under System: User Extensions:.
By keeping the extensions in the user extension directory I don't have to re-install extensions with every upgrade.
I have several versions of Inkscape on my machines and only need to keep one set of extensions for all of them.
Do not copy the extensions witch are part of the Inkscape installation to the user extensions directory as some of the extensions receive upgrades and bug fixes from one version to the next. You always want the latest versions of the extension files.
I seem to lose extensions with uploads, so will wait until I upgrade to 92.2.
A lot of the recommendations (some found here on the forum) on installing extensions tells you to install them in the Inkscape install directory.
For me this is not the best solution as the extensions will not "survive" an upgrade or re-install of Inkscape.
Extensions you download and extensions you want to stay permanent
should NOT be copied to the Inkscape Installation directory.
(on my Windows 10 machine: "C:\Graphics\Inkscape\share\extensions".
Your install might use "C:\Program Files" or "C:\Program Files (x86)"
instead of the "C:\Graphics" as on my system.)
Rather they should be copied to the user extension directory,
on my Windows10 machine: C:\Users\ragnar\AppData\Roaming\inkscape\extensions
The path to this directory can be found in the Inkscape preferences by
typing: Shift + Control + P and then click the "System" - The path will be listed under System: User Extensions:.
By keeping the extensions in the user extension directory I don't have to re-install extensions with every upgrade.
I have several versions of Inkscape on my machines and only need to keep one set of extensions for all of them.
Do not copy the extensions witch are part of the Inkscape installation to the user extensions directory as some of the extensions receive upgrades and bug fixes from one version to the next. You always want the latest versions of the extension files.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: convert svg to jpg
For more extensions and general instructions for installing extensions (operating system independent), see also:
https://inkscape.org/en/gallery/%3Dextension/
https://inkscape.org/en/gallery/%3Dextension/
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)
-
- Posts: 2
- Joined: Wed Dec 06, 2017 4:01 pm
Re: convert svg to jpg
Not to hijack the thread or anything, but I downloaded Inkscape tonight to make some images for an app I'm working on. I want to be able to use scalable graphics to address issues with the app being used on different platforms (e.g., iPad vs iPhone) with different display dimensions. So, I did a tutorial and drew a simple shape and went to export it as an .SVG and much to my surprise, you can't export in .SVG (apparently). I can export as .PNG, but .PNG will not scale up with resolution loss (or so I've read). So, I don't get it. What's the point of creating a vector image only to be unable to export it for use in a vector format (i.e. svg) that I can scale up or down without resolution loss? I'm probably missing something crucial here, so I'm ready to be set straight.
I guess the idea (if my understanding above is correct) is to export as a .PNG, but make it larger than or equal to the largest size I would anticipate using in my apps? Thanks for the input.
I guess the idea (if my understanding above is correct) is to export as a .PNG, but make it larger than or equal to the largest size I would anticipate using in my apps? Thanks for the input.
Re: convert svg to jpg
Inkscape's native format is SVG, so you should use "Save as..." rather than "Export" to save as an SVG file.
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: convert svg to jpg
Please start a new topic when you have an unrelated question.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
Re: convert svg to jpg
@Gitte, are you still here...?
If not, the following might also be helpful to others.
I still assume you want to include an SVG into MSWord(?) and you don't want to lose the quality of the SVG by converting it to .png or .jpg?
Try the following:
- open the SVG with Inkscape
- select all objects (Ctrl+A)
- copy the objects (Ctrl+C) to the clipboard
- go to MSWord and Paste | Paste Special (Alt+Ctrl+V) | Picture (Enhanced Metafile)
It looks like vector data is included which you can also check if you create a PDF. You can zoom in endlessly always having best quality. I don't know whether this will always work, but at least this seems to work on a Win7 system with MSOffice2013 Home&Student. If you are pasting with Ctrl+V, just a pixelated image will be included.
If not, the following might also be helpful to others.
I still assume you want to include an SVG into MSWord(?) and you don't want to lose the quality of the SVG by converting it to .png or .jpg?
Try the following:
- open the SVG with Inkscape
- select all objects (Ctrl+A)
- copy the objects (Ctrl+C) to the clipboard
- go to MSWord and Paste | Paste Special (Alt+Ctrl+V) | Picture (Enhanced Metafile)
It looks like vector data is included which you can also check if you create a PDF. You can zoom in endlessly always having best quality. I don't know whether this will always work, but at least this seems to work on a Win7 system with MSOffice2013 Home&Student. If you are pasting with Ctrl+V, just a pixelated image will be included.
Win7/64, Inkscape 0.92.2
Re: convert svg to jpg
disposableorchestra wrote:Not to hijack the thread or anything, but I downloaded Inkscape tonight to make some images for an app I'm working on. I want to be able to use scalable graphics to address issues with the app being used on different platforms (e.g., iPad vs iPhone) with different display dimensions. So, I did a tutorial and drew a simple shape and went to export it as an .SVG and much to my surprise, you can't export in .SVG (apparently). I can export as .PNG, but .PNG will not scale up with resolution loss (or so I've read). So, I don't get it. What's the point of creating a vector image only to be unable to export it for use in a vector format (i.e. svg) that I can scale up or down without resolution loss? I'm probably missing something crucial here, so I'm ready to be set straight.
I guess the idea (if my understanding above is correct) is to export as a .PNG, but make it larger than or equal to the largest size I would anticipate using in my apps? Thanks for the input.
Does it work? I mean exporting a big .png file and see if the size is fit your app? This summary can show you which format might be needed to avoid resolution loss beside .svg: https://www.1and1.co.uk/digitalguide/we ... important/
I guess the .tiff file might be best, it can ensure no pixel lost but I would try to install Inkscape again and export .svg file.
Re: convert svg to jpg
NathanMc wrote:disposableorchestra wrote:Not to hijack the thread or anything, but I downloaded Inkscape tonight to make some images for an app I'm working on. I want to be able to use scalable graphics to address issues with the app being used on different platforms (e.g., iPad vs iPhone) with different display dimensions. So, I did a tutorial and drew a simple shape and went to export it as an .SVG and much to my surprise, you can't export in .SVG (apparently). I can export as .PNG, but .PNG will not scale up with resolution loss (or so I've read). So, I don't get it. What's the point of creating a vector image only to be unable to export it for use in a vector format (i.e. svg) that I can scale up or down without resolution loss? I'm probably missing something crucial here, so I'm ready to be set straight.
I guess the idea (if my understanding above is correct) is to export as a .PNG, but make it larger than or equal to the largest size I would anticipate using in my apps? Thanks for the input.
Does it work? I mean exporting a big .png file and see if the size is fit your app? This summary can show you which format might be needed to avoid resolution loss beside .svg: https://www.1and1.co.uk/digitalguide/we ... important/
I guess the .tiff file might be best, it can ensure no pixel lost but I would try to install Inkscape again and export .svg file.
Unless I misunderstand disposableorchestra's question, the answer is:
Of course Inkscape can produce SVG files. Scale the image in Inkscape, and then File menu > Save As, rather than Export PNG.
For the op, there's an extension to export JPGs: https://github.com/giacmir/Inkscape-JPE ... -extension Hhm, more than one, apparently. I'm not sure which one, if any, works: https://github.com/sepastian/inkscape-svg2jpg
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design