Hi folks,
I'm having an issue which looks like a bug to me, but before I file bug report I'd like to check here first.
I've created a number of buttons in Inkscape which I plan to use as part of an Android app. I want to export them at a number of different sizes, but I'm encountering a strange problem. When I export each button in turn at 140x50px, everything is fine. If I export the same selection, changing nothing apart from altering the size to 280x100px, the resulting image is "offset", such that I lose the top and the left-hand edges. I've posted some examples below.
Button 1 at 140x50px:
Button 1 at 280x50px:
The Inkscape SVG can be found here: https://dl.dropboxusercontent.com/u/333 ... uttons.svg
I've looked around, but haven't found anything that helped. Has anyone else seen this before? Does it seem like a bug to you too, or have I overlooked something? Is there a workaround I can use?
Thanks very much,
simon
exporting if offset at different sizes
Re: exporting if offset at different sizes
I`m not quite sure, but this could happen dew to the filter or effects rendering. Scaling "shapes" with filters/fx already applied could produce such behavior. You may found more on this subject, here on forum, while searching the key words - filter, effects, blur.
Solution could be to disable filter/fx before duplicating the button and then to apply same filter/fx, since results in some case differ significantly - when applied on objects of a different size.
Solution could be to disable filter/fx before duplicating the button and then to apply same filter/fx, since results in some case differ significantly - when applied on objects of a different size.
Re: exporting if offset at different sizes
Thanks Maestral. I wasn't duplicating the button, I was simply trying to export the same button to a different (larger) bitmap file. I found, in the end, that if I exported to about 10 times the size I needed, I could rescale the resulting raster files in GIMP and get a decent enough result for the time being.
Re: exporting if offset at different sizes
Sorry simonw, misunderstanding.
Here, on forum, was a lot discussions about renderings of filtered images and how much is Cairo responsible for such behavior. Even sole application of filters/fx etc. were elaborated. That could be a reason for my misinterpretation. Still, I was able to get a bit better scaled exports, in .png.
This is the original (140x50px at 90dpi)
"scaled export" (140x50px at 180dpi)
Perhaps someone else with better understanding of this problem might have to say something more, while I could just add this screenshot from IS, of the original button and the scaled one, next to it - and when I exported this enlarged button (at 90dpi) it looks the same as the "scaled export"?!
I could add that one as well, but it really is exactly the same as this one already posted above. Have no clue what is causing this. On the other hand, glad to hear that you managed to get what you needed.
Here, on forum, was a lot discussions about renderings of filtered images and how much is Cairo responsible for such behavior. Even sole application of filters/fx etc. were elaborated. That could be a reason for my misinterpretation. Still, I was able to get a bit better scaled exports, in .png.
This is the original (140x50px at 90dpi)
"scaled export" (140x50px at 180dpi)
Perhaps someone else with better understanding of this problem might have to say something more, while I could just add this screenshot from IS, of the original button and the scaled one, next to it - and when I exported this enlarged button (at 90dpi) it looks the same as the "scaled export"?!
I could add that one as well, but it really is exactly the same as this one already posted above. Have no clue what is causing this. On the other hand, glad to hear that you managed to get what you needed.
Re: exporting if offset at different sizes
.... and the winner is.... poor clipping!
What I missed to spot is that you used clipmask, I presume, in order to retain needed size of the button. Well, the thick stroke was causing the chopped exports and if you`d need to do it again avoid stroked and filled clipmasks.
Solution is quite simple:
1. Use just the shape w/o stroke and in the exact size, as needed
2. Use unfilled shape with the stroke (in rounded numbers of px) where mask`s size is enlarged for the number of px in stroke (in this case, stroke is 1px and the whole mask is 141x51px) and export would work like a charm, again
Ohm, yes... using snapping/alignment is useful but for masking it`s almost essential ,)
What I missed to spot is that you used clipmask, I presume, in order to retain needed size of the button. Well, the thick stroke was causing the chopped exports and if you`d need to do it again avoid stroked and filled clipmasks.
Solution is quite simple:
1. Use just the shape w/o stroke and in the exact size, as needed
2. Use unfilled shape with the stroke (in rounded numbers of px) where mask`s size is enlarged for the number of px in stroke (in this case, stroke is 1px and the whole mask is 141x51px) and export would work like a charm, again
Ohm, yes... using snapping/alignment is useful but for masking it`s almost essential ,)