PDA

View Full Version : Inkscape Save Problem



icosahedron
04-19-2009, 10:44 AM
I'm experiencing a problem with inkscape saves (v0.46) - maybe I'm doing something wrong?

Saving as svg is fine, but there is no option to save as png, it's not listed on the save as type list. There is an option to 'guess from file extension', and I have added .png to the filename, chosen 'guess from file extension and saved.

However, there is no thumbnail generated when I browse for the png in Explorer, and my image browser (Xnview) can't see it. When I try to open the png again in Inkscape I get a runtime error and the program crashes, but Gimp opens the png with no problems. If I then do a Save As from Gimp, the png saves normally, I can see it in my browser, and Inkscape opens it.

Any ideas what is happening? I don't want to have to use Gimp to open and resave every png I produce with Inkscape.

Midgardsormr
04-19-2009, 11:46 AM
I don't have Inkscape installed right now, but I suspect that you need to export rather than save as. PNG is a raster format, not a vector one, so Inkscape can't edit it once it's been made. Saving is for files that you can open and work on again. Exporting is for converting to another format which cannot be manipulated by the software.

Naeddyr
04-19-2009, 11:46 AM
Inkscape is not a raster program, so it won't save it as PNG or open your png files for editing! To save as a png, you will have to export it, using either menu > export or the export toolbar icon. To open a png in inkscape (or any raster image), you have to import it into inkscape as an object.

I suspect that when you save it as ".png", you are saving it as a svg with a false .tag! When Inkscape tries to open this, it crashes; explorer doesn't make thumbnails out of SVG files; and GIMP actually converts your SVG file into a raster file for editing.

Btw, exporting from Inkscape saves it as a 24-bit PNG, so if you want it indexed, you need to open it in GIMP anyhow.

icosahedron
04-19-2009, 05:18 PM
Thanks guys. You're right, I should have exported.
Naeddyr, you were spookily right. :) Inkscape was saving as svg with a false tag and Gimp was converting it, so I never had a png until Gimp created one. I didn't notice what it was doing until you highlighted it.

What is 'indexed'?
Is 24-bit bad?

Naeddyr
04-19-2009, 05:49 PM
Thanks guys. You're right, I should have exported.
Naeddyr, you were spookily right. :) Inkscape was saving as svg with a false tag and Gimp was converting it, so I never had a png until Gimp created one. I didn't notice what it was doing until you highlighted it.


Hu hu hu hu hu. :3




What is 'indexed'?
Is 24-bit bad?

Colours on images are stored as sets of numbers. The simplest way is to use 0 and 1 for black and white (which one computers can be very very efficient), the next simplest is to have a small amount of unique colours, and just list what they are, and then you have when you simply leave out any inhibitions and encode everything with several bytes. 16-bit is when you have 255x255x255 (FF.FF.FF) combinations, red green and blue, and 24 is when one more channel is introduced in the form of alpha transparency.

An indexed file is simply a file with a palette or certain set of colours encoded in it (usually 255 colours is the upper limit). GIF are always indexed, but PNG can be both 24-bit (with transparency) and indexed (without, iirc). If your image has only a small amount of unique colours, and indexing doesn't cause degradation, it usually is better to use indexed so that you get a much smaller sized file. If your image has a lot of unique colours, and it does not have large swathes of a single colour (red is an offender here), it's usually also better to use JPG than 24-bit PNG. The differences in size are usually considerable.

Midgardsormr
04-20-2009, 12:22 AM
Be aware, though, that an indexed PNG with transparency will tend to have rougher edges because it's more difficult to anti-alias (smooth away the "jaggies") with fewer colors. If you need good crisp edges for a stamp, you're usually best off sticking with a 24-bit PNG.

Naeddyr
04-20-2009, 04:31 AM
Be aware, though, that an indexed PNG with transparency will tend to have rougher edges because it's more difficult to anti-alias (smooth away the "jaggies") with fewer colors. If you need good crisp edges for a stamp, you're usually best off sticking with a 24-bit PNG.

Just tried it out (thought PNG had only transparency support for 24-bit), and it seems like it can only support one transparent colour (so there's no alpha-channelled colours). Wonder why... I mean, adding alpha-channel support in a palette would only marginally increase file-sizes (that's what like, 255 bytes, 0.25 kbytes per file).

icosahedron
04-20-2009, 05:33 AM
Phew, a lot of that is over my head, guys.
I know that jpg takes up less space, but you can't use it for transparency, and if you keep tweaking and resaving it, errors build up with each save.
I didn't know there were two types of PNG though. Most of my stuff is simple (simple is my limit. :)) so 255 colours might be all I need. However, I'll just take whatever the software offers for now and worry about the differences when I have more knowledge. :)
At least now I have some form of png saved.
Thanks.

Midgardsormr
04-20-2009, 02:45 PM
Just tried it out (thought PNG had only transparency support for 24-bit), and it seems like it can only support one transparent colour (so there's no alpha-channelled colours). Wonder why... I mean, adding alpha-channel support in a palette would only marginally increase file-sizes (that's what like, 255 bytes, 0.25 kbytes per file).

But an indexed file doesn't use channels at all. PNG-8 can actually support more than one transparent color, but not translucency. It depends on your software whether or not you can designate more than one transparent color, though.

Ico: There are actually four versions of PNG, but all that's important to know is that 8-bit PNG is smaller, but it doesn't do angled and round boundaries well. If your stamps are square, 8-bit is fine. If not, use 24-bit.

Naeddyr
04-20-2009, 02:57 PM
But an indexed file doesn't use channels at all. PNG-8 can actually support more than one transparent color, but not translucency. It depends on your software whether or not you can designate more than one transparent color, though.

I meant in the colour definitions, where they have to use channels to define the palette. You might as well add translucency at this point.

Midgardsormr
04-21-2009, 10:40 AM
Ah, I get it. Interesting idea.

edit: Page break again? It's like a superpower.