hi -
i'm new to vector graphics and inkscape, working on a project to help my kids think about geography.
i downloaded a generic blank world map with country outlines in .svg from wikipedia. i want to create overlays for each country we study that have layers for topography, satellite image, population density, etc. inkscape opens the .svg fine, and using "document properties" i see it has about the size i intended to work with -- each continent fits roughly on 8.5"x11".
then i used ctrl-v to paste a topographic map for a certain country that i copied from a png into a new layer. it appears at full resolution fine. i used low opacity to scale it down and move it to sit in the correct location. however, scaling down the raster loses a ton of detail/quality. if i understand svg correctly, i should be able to scale down raster images without losing quality -- i should always be able to zoom down to the original pixels, no matter how small they get. i need the original quality preserved, and hope to only lose quality when finally rendering on a particular printer/screen/etc.
is there any way to do this?
i'm on osx 10.13.6 and installed inkscape 0.92.2 2405546 using macports (x11, not xquartz).
thanks!
-erik
how to keep raster quality/detail when scaling down?
Re: how to keep raster quality/detail when scaling down?
No, I think you misunderstood about SVG and scaling. There's no way to scale a raster image without losing quality. Just because it's in an SVG or other vector format file, it's still a raster image, and it still pixelates when scaled (or zoomed).
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
Re: how to keep raster quality/detail when scaling down?
When I zoom into a bitmap image that I scaled in Inkscape with the scaling handles, I can see all the details that are in it (i.e. it pixelates at its real pixels). I'm not sure, though, if that's what you've been doing.
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: how to keep raster quality/detail when scaling down?
@brynn, can you cite a reference supporting your claim? i can't find a reference that explicitly states otherwise, but my understanding is that a raster image embedded in an svg keeps all of its data. scaling it simply defines the size at which it is rendered (like.html
Re: how to keep raster quality/detail when scaling down?
@Moini: what OS/inkscape version?
Re: how to keep raster quality/detail when scaling down?
@hiccup: does copy/paste work correctly for you with the x11 version? That can be a source of confusion, it's making bitmap copies with 96 dpi on Mac with XQuartz, dunno about x11.
See our FAQ: https://inkscape.org/en/learn/faq/#copy ... es-objects
Linux Mint 18.3, 0.92.3.
See our FAQ: https://inkscape.org/en/learn/faq/#copy ... es-objects
Linux Mint 18.3, 0.92.3.
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: how to keep raster quality/detail when scaling down?
No, I can't cite any references. It's just a fact of life that if you scale a raster image, it will pixelate. I have heard people say that scaling down a raster image won't pixelate it, but I've never been able to accomplish any scaling of a raster image, without degrading the sharpness. I suppose I could say that scaling down doesn't seem to pixelate as badly as scaling up. But I still can notice it.
It's possible that I'm misunderstanding what you're trying to say. I'm not sure what you mean when you say that it "keeps all of its data". What data? Pixels, dpi, the string of (seemingly) random characters which defines the raster image?
I mean, like Moini says, you can zoom into a raster image and see the pixels. You can see the pixels very, VERY clearly if you use the Blocky (optimize speed) option, on import. If you use any of the other options, it might be harder to see the actual pixels.
If you scale the image, it looks to me like the pixels get larger (and scale down they get smaller). So if you scale a raster image within Inkscape, the DPI must be changing. The pixels are getting larger or smaller, but the number of pixels remains the same.
Using the XML Editor, I can see that scaling a raster image doesn't change the string of seemingly random characters. Maybe that's what you mean by keeping the data?
It's possible that I'm misunderstanding what you're trying to say. I'm not sure what you mean when you say that it "keeps all of its data". What data? Pixels, dpi, the string of (seemingly) random characters which defines the raster image?
I mean, like Moini says, you can zoom into a raster image and see the pixels. You can see the pixels very, VERY clearly if you use the Blocky (optimize speed) option, on import. If you use any of the other options, it might be harder to see the actual pixels.
If you scale the image, it looks to me like the pixels get larger (and scale down they get smaller). So if you scale a raster image within Inkscape, the DPI must be changing. The pixels are getting larger or smaller, but the number of pixels remains the same.
Using the XML Editor, I can see that scaling a raster image doesn't change the string of seemingly random characters. Maybe that's what you mean by keeping the data?
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
Re: how to keep raster quality/detail when scaling down?
Brynn, in Inkscape, if you use the handles to scale a raster image, it just makes it look smaller, it keeps all image data points. Inkscape does not edit raster images. This is in concordance with your observations in the XML editor.
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: how to keep raster quality/detail when scaling down?
@Moini - well, according to the FAQ, copy/paste on OSX *rasterizes vectors.* but this was already a raster, what it did was *reduce its quality/resolution" -- i guess because it uses screen capture instead of looking at the actual data in the clipboard? doesn't make sense to me because i right-click copied a png from a webpage, so the clipboard had the full resolution. there was no "screen" for x11 to "capture", and i don't know why it would think it would need to since it wasn't a vector.
@Brynn - think of embedding a raster as saying "draw all these dots in a square with these dimensions." then, if you scale it down, you're saying "put those same dots in a square with these other dimensions." either way, it's still all the same dots. if you zoom in, you can still see them all. a particular rendering at a particular scale may not be able to draw or show them all, but they would be there if you changed the scale or the resolution of the rendering. that's how it works when you import on OSX, or import/cut/paste on other platforms. but the bug on OSX is that it throws away some dots.
@Brynn - think of embedding a raster as saying "draw all these dots in a square with these dimensions." then, if you scale it down, you're saying "put those same dots in a square with these other dimensions." either way, it's still all the same dots. if you zoom in, you can still see them all. a particular rendering at a particular scale may not be able to draw or show them all, but they would be there if you changed the scale or the resolution of the rendering. that's how it works when you import on OSX, or import/cut/paste on other platforms. but the bug on OSX is that it throws away some dots.
Re: how to keep raster quality/detail when scaling down?
It's the same underlying issue, as far as I understand, yes. Are you able to change the pasteboard settings in your installation?
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: how to keep raster quality/detail when scaling down?
Well I know that if you paste vector contents on a Mac, it rasterizes the pasted content. Are you saying that pasting a raster image damages the raster image? Or that scaling it after you paste it damages it (but doesn't damage non-pasted raster image)?
I'm not sure if that's been known, up until now. At least I haven't heard it.
But if that's the problem, you can avoid it by not using Copy/Paste. As far as I understand, it's more typical to use Duplicate, rather than copy/paste, in graphics. (I have no idea why, but that's what I've been told.) (here in this forum, years ago) Edit menu > Duplicate, or this button in the command bar
, or else there's probably a keyboard shortcut (Help menu > Key and Mouse Ref).
I'm sure that must be a big pain for Mac users. It's a llooooong standing bug, which probably means that it's very hard to fix.
I'm not sure if that's been known, up until now. At least I haven't heard it.
But if that's the problem, you can avoid it by not using Copy/Paste. As far as I understand, it's more typical to use Duplicate, rather than copy/paste, in graphics. (I have no idea why, but that's what I've been told.) (here in this forum, years ago) Edit menu > Duplicate, or this button in the command bar

I'm sure that must be a big pain for Mac users. It's a llooooong standing bug, which probably means that it's very hard to fix.
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
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: how to keep raster quality/detail when scaling down?
hiccup wrote:importing the png allows scaling down without losing quality. it must be the copy/paste that causes the problem. anyone know why they are different?
I concur with Moini... Most likely the Mac copy buffer issue.
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/