Hello,
I have some problems when I export an image I drew in inkscape.
You can see in the attached files (image01) the image drawn in inkscape : the borders are "sharp". But when I export it, as a PNG file, it adds some transparency (image 02) on the borders.
How can I avoid that ??? The image has no borders in inkscape and in the document properties, the "antialiasing" box is unticked.
If you have the solution...
Problem with image borders when exporting
-
- Posts: 3
- Joined: Sat Dec 16, 2017 11:02 pm
Problem with image borders when exporting
- Attachments
-
- image02.JPG (106.73 KiB) Viewed 2149 times
-
- image01.JPG (27.97 KiB) Viewed 2149 times
Re: Problem with image borders when exporting
Hi.
As far as I know the next inkscape version will offer options on anti-aliasing on exporting.
Until then, the pixellize filter can help.
Group all objects, and apply the pixellize filter (filters/pixel tools/pixellize).
Unfortunately this works only by making the alpha channels transitions "steeper". If you have any semi-transparent parts, they will end up either opaque or invisible.
As far as I know the next inkscape version will offer options on anti-aliasing on exporting.
Until then, the pixellize filter can help.
Group all objects, and apply the pixellize filter (filters/pixel tools/pixellize).
Unfortunately this works only by making the alpha channels transitions "steeper". If you have any semi-transparent parts, they will end up either opaque or invisible.
-
- Posts: 3
- Joined: Sat Dec 16, 2017 11:02 pm
Re: Problem with image borders when exporting
Thank you, it works !
The only weird thing is that it changes the size of the image : from 128x64 it goes to 154x77 so I have to resize it in GIMP. It's not a big deal, but of there is a solution...
The only weird thing is that it changes the size of the image : from 128x64 it goes to 154x77 so I have to resize it in GIMP. It's not a big deal, but of there is a solution...
Re: Problem with image borders when exporting
The filter adds in extra space to the filtered object's visual bounding box. Thought you exported the page instead of the selected (filtered) object.
Filter can also be changed with the filter editor for an exact bounding box.
Filter can also be changed with the filter editor for an exact bounding box.
-
- Posts: 3
- Joined: Sat Dec 16, 2017 11:02 pm
Re: Problem with image borders when exporting
Hello,
I'm back on this topic because the pixellize filter trick doesn't work anymore on the last objects I try to export.
I have a friend who uses Adobe Illustrator : is there a way to open my Inkscape file (in what format ?) in AI and then export the images to PNG files in AI (without anti-aliasing) ?
I'm back on this topic because the pixellize filter trick doesn't work anymore on the last objects I try to export.
I have a friend who uses Adobe Illustrator : is there a way to open my Inkscape file (in what format ?) in AI and then export the images to PNG files in AI (without anti-aliasing) ?
Re: Problem with image borders when exporting
It is not an Inkscape issue. To obtain your goal, you can do one of either:
- Increase DPI when exporting png (a multiple of 96 should gife best results if dealing with px)
- Use Gimp - Make a new mask, and use existing alpha. When in edit mask mode, decrease colors to 2. That will give sharp edges, but also a zig-sag pattern on all slopes in alpha channel.
- Increase DPI when exporting png (a multiple of 96 should gife best results if dealing with px)
- Use Gimp - Make a new mask, and use existing alpha. When in edit mask mode, decrease colors to 2. That will give sharp edges, but also a zig-sag pattern on all slopes in alpha channel.

Re: Problem with image borders when exporting
Well...
if you want to export a png with fully aliased-jaggy- edges, it is possible to do so with filtering.
Recently made a template which you can use to produce fully black&white images out of any drawn objects based on their luminosity -with no anti-aliasing whatsoever.
Will try if the concept can be pushed further.
if you want to export a png with fully aliased-jaggy- edges, it is possible to do so with filtering.
Recently made a template which you can use to produce fully black&white images out of any drawn objects based on their luminosity -with no anti-aliasing whatsoever.
Will try if the concept can be pushed further.