Hi all
Showing my ignorance here, but what is the best way of obtaining a .jpg file from a .svg file done in Inkcape, while preserving transparencies and true colours? I am having a bit of a bother doing this - saving as .svg or .png then opening in Illustrator, Photoshop, Fireworks ... doesn't preserve the integrity of the original.
I want a .jpg for web use - not everyone can read .svg, can they? And .png files are rather large? Any comments will be very welcome ...
Regards from Adam in Oz
Showing my ignorance here, but what is the best way of obtaining a .jpg file from a .svg file done in Inkcape, while preserving transparencies and true colours?
You can't have transparency in JPG. It's not supported by the format. Use PNG or GIF if you need transparency. In any case, PNG is much better suited for the type of graphics that Inkscape typically produces (sharp boundaries, flat color areas). JPG is not efficient for such graphics and introduces ugly artefacts at boundaries.
Thanks bulia
I should have said "apparent transparencies" - for example, I am doing a drawing of a young girl seen half through a glass of water. So I can do (in Inkscape) the "orange" of her shirt by creating her shirt as "orange" then superimposing the slightly blue tones of the glass, with appropriate transparency to give the "perceived" colour. If I do this, what I want to preserve is the "perceived" orange, affected by the slightly blue glass. I am not actually worried and don't need or want a transparency, this was my fault in explaining the question, please accent my apologies. What I want is to retain the colours achieved by overlaying transparencies in Inkscape, preferably as a .jpg, or a .gif will do. I find .png files sizes a bit big, is this not usually so?
So if I want to do this and go to a .gif, do I need to go through Photoshop (for example)?
Regards, Adam in Oz
-------Original Message-------
From: inkscape-user@lists.sourceforge.net Date: 08/08/04 10:03:15 To: inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] Preserving transparency
Showing my ignorance here, but what is the best way of obtaining a .jpg file from a .svg file done in Inkcape, while preserving transparencies and true colours?
You can't have transparency in JPG. It's not supported by the format. Use PNG or GIF if you need transparency. In any case, PNG is much better suited for the type of graphics that Inkscape typically produces (sharp boundaries, flat color areas). JPG is not efficient for such graphics and introduces ugly artefacts at boundaries.
On Sat, 2004-08-07 at 20:33, Adam Pearson wrote:
If I do this, what I want to preserve is the "perceived" orange, affected by the slightly blue glass. I am not actually worried and don't need or want a transparency, this was my fault in explaining the question, please accent my apologies. What I want is to retain the colours achieved by overlaying transparencies in Inkscape, preferably as a .jpg, or a .gif will do. I find .png files sizes a bit big, is this not usually so?
So this is really just question of which formats have good color preservation/accuracy and decent size?
Of widely web-supported formats, here's the breakdown:
PNG (RGB color) - what Inkscape produces; larger, but best color accuracy and preserves alpha channel
JPEG (RGB color) - good color accuracy, but can bleach colors from fine details depending on the subsampling options you use; you can also have weird artifacts on the sharp edges that are common with vector-produced graphics
GIF (indexed color) - smaller, but if the image is very colorful GIF may have problems reproducing the colors using a palette of only 256
PNG (indeded color) - smaller than GIFs, can preserve alpha (subject to browser support), but otherwise same limitations as GIF
As you can see, PNG supports both RGB and indexed color modes.
Note that indexed PNGs will only be smaller if you create them with decent software (read: not Adobe Photoshop, which has crap PNG support), or run something like pngcrush on them afterwards.
-mental
On Sun, 8 Aug 2004, Adam Pearson wrote:
Date: Sun, 8 Aug 2004 10:33:28 +1000 From: Adam Pearson <addon@...121...> Reply-To: inkscape-user@lists.sourceforge.net To: inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] Preserving transparency
Thanks bulia
I should have said "apparent transparencies" - for example, I am doing a drawing of a young girl seen half through a glass of water. So I can do (in Inkscape) the "orange" of her shirt by creating her shirt as "orange" then superimposing the slightly blue tones of the glass, with appropriate transparency to give the "perceived" colour. If I do this, what I want to preserve is the "perceived" orange, affected by the slightly blue glass. I am not actually worried and don't need or want a transparency, this was my fault in explaining the question, please accent my apologies. What I want is to retain the colours achieved by overlaying transparencies in Inkscape,
PNG is lossless so you can always convert the PNG to JPEG or GIF later in some other application. There is already a feature request for JPEG export in Inkscape but no one has gotten around to adding it yet (either that or the Export dialog has no way of using it).
preferably as a .jpg, or a .gif will do. I find .png files sizes a bit big, is this not usually so?
Try reducing the PNG from 24-bit colour to 8-bit colour and make sure that file compression is set to Full. This can make a significant difference, because PNG is lossless and supports so much more than GIF there is misunderstanding as to why it produces slightly larger files but with a little bit of effort you can always produce much smaller files. I have heard tools like pngcrush recommended and there are plenty of other tools for getting very small PNG files.
Hope that helps
Sincerely
Alan Horkan http://openclipart.org
Thanks guys
Thanks to all who responded to my head-scratchings over achieving "good color preservation/accuracy and decent size" in png files when exported to other formats - all comments have been very helpful and have increased my understanding of the topic and my ability to throw files around in various formats to suit circumstances.
Very much appreciated ... regards,
Adam in Oz
On Sun, 2004-08-08 at 19:39, Adam Pearson wrote:
Thanks guys
Thanks to all who responded to my head-scratchings over achieving "good color preservation/accuracy and decent size" in png files when exported to other formats - all comments have been very helpful and have increased my understanding of the topic and my ability to throw files around in various formats to suit circumstances.
Glad to be of assistance. ^_^
-mental
On Sun, 8 Aug 2004, Adam Pearson wrote:
Showing my ignorance here, but what is the best way of obtaining a .jpg file from a .svg file done in Inkcape, while preserving transparencies and true colours? I am having a bit of a bother doing this - saving as .svg or .png then opening in Illustrator, Photoshop, Fireworks ... doesn't preserve the integrity of the original.
I want a .jpg for web use - not everyone can read .svg, can they? And .png files are rather large? Any comments will be very welcome ...
Jpeg is not appropriate for most SVG artwork -- until SVG or maybe JPEG2000 is better supported by viewers you will want to use PNG for web viewing. What specifically is lost when you convert to PNG?
The problem with JPEG is that compression is achieved by discarding high-frequency information. This will create artifacts around "edges", e.g., any abrupt transition.
-- George White
On Thu, 12 Aug 2004, George N. White III wrote:
On Sun, 8 Aug 2004, Adam Pearson wrote:
Showing my ignorance here, but what is the best way of obtaining a .jpg file from a .svg file done in Inkcape, while preserving transparencies and true colours? I am having a bit of a bother doing this - saving as .svg or .png then opening in Illustrator, Photoshop, Fireworks ... doesn't preserve the integrity of the original.
I want a .jpg for web use - not everyone can read .svg, can they? And .png files are rather large? Any comments will be very welcome ...
Jpeg is not appropriate for most SVG artwork -- until SVG or maybe JPEG2000 is better supported by viewers you will want to use PNG for web viewing. What specifically is lost when you convert to PNG?
The problem with JPEG is that compression is achieved by discarding high-frequency information. This will create artifacts around "edges", e.g., any abrupt transition.
Also, the default output of many png generators is not tweaked to minimize filesize as much as possible. If your goal with using jpg is filesize reduction, it can pay off to learn more about the standard png compression settings. :-)
Bryce
George, Bryce
The original problem was that when I converted a png file to a gif or jpg (so as to keep the file size small), then areas that were transparent and showing detail below were going opaque and not showing that underlying detail. Images were therefore losing their purpose. (This may just have been a bad day for me at the computer! No, it wasn't - I have just tried Fireworks and Photoshop and they won't read the Inkscape transparency of a png file correctly for me.)
As you say, the real solution is to concentrate on compression of the png files - how is it best to do that? I am on Windows XP Home edition. I have tried something called Irfanview and it does not read the png file correctly - loses transparency.
Regards
Adam
Adam Pearson wrote:
George, Bryce
The original problem was that when I converted a png file to a gif or jpg (so as to keep the file size small), then areas that were transparent and showing detail below were going opaque and not showing that underlying detail. Images were therefore losing their purpose. (This may just have been a bad day for me at the computer! No, it wasn't - I have just tried Fireworks and Photoshop and they won't read the Inkscape transparency of a png file correctly for me.)
As you say, the real solution is to concentrate on compression of the png files - how is it best to do that? I am on Windows XP Home edition. I have tried something called Irfanview and it does not read the png file correctly - loses transparency.
use Gimp for bitmap editing, it has a Windows version - http://gimp.org/windows/ i had no problem with PNG files exported from Inkscape in Gimp.
also, please note that JPEG as a file format does not support transparency
Many thanks, nicu. I have the gimp installed and looks good with that.
Adam in Oz
-------Original Message-------
From: inkscape-user@lists.sourceforge.net Date: 08/13/04 16:24:44 To: inkscape-user@lists.sourceforge.net Subject: Re: [Inkscape-user] Re: Preserving transparency
Adam Pearson wrote:
George, Bryce
The original problem was that when I converted a png file to a gif or jpg (so as to keep the file size small), then areas that were transparent and showing detail below were going opaque and not showing that underlying detail. Images were therefore losing their purpose. (This may just have been a bad day for me at the computer! No, it wasn't - I have just tried Fireworks and Photoshop and they won't read the Inkscape transparency of a png file correctly for me.)
As you say, the real solution is to concentrate on compression of the png files - how is it best to do that? I am on Windows XP Home edition. I have tried something called Irfanview and it does not read the png file correctly - loses transparency.
use Gimp for bitmap editing, it has a Windows version - http://gimp.org/windows/ i had no problem with PNG files exported from Inkscape in Gimp.
also, please note that JPEG as a file format does not support transparency
-- nicu
participants (7)
-
Adam Pearson
-
Alan Horkan
-
Bryce Harrington
-
bulia byak
-
George N. White III
-
MenTaLguY
-
Nicu Buculei