Problem with image borders when exporting

Post questions on how to use or achieve an effect in Inkscape.
Dolcevita83
Posts: 3
Joined: Sat Dec 16, 2017 11:02 pm

Problem with image borders when exporting

Postby Dolcevita83 » Sat Dec 16, 2017 11:21 pm

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...
Attachments
image02.JPG
image02.JPG (106.73 KiB) Viewed 2149 times
image01.JPG
image01.JPG (27.97 KiB) Viewed 2149 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Problem with image borders when exporting

Postby Lazur » Sat Dec 16, 2017 11:41 pm

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.

Dolcevita83
Posts: 3
Joined: Sat Dec 16, 2017 11:02 pm

Re: Problem with image borders when exporting

Postby Dolcevita83 » Sun Dec 17, 2017 2:46 am

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...

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Problem with image borders when exporting

Postby Lazur » Sun Dec 17, 2017 3:20 am

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.

Dolcevita83
Posts: 3
Joined: Sat Dec 16, 2017 11:02 pm

Re: Problem with image borders when exporting

Postby Dolcevita83 » Tue Apr 17, 2018 7:24 pm

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) ?

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Problem with image borders when exporting

Postby Grobe » Wed Apr 18, 2018 12:52 am

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.
:lol:

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Problem with image borders when exporting

Postby Lazur » Wed Apr 18, 2018 7:06 am

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.


Return to “Help with using Inkscape”