Inkscape Community

Help Using Inkscape => Inkscape Beginners' Questions => Topic started by: Lucienne van Dam on June 19, 2018, 03:01:08 AM

Title: unsharp text after exporting to .png
Post by: Lucienne van Dam on June 19, 2018, 03:01:08 AM
Hi there, l'm new on Inkscape, Dutch (so excuse my english) when I export my svg-logo to .png the text (30px) sometimes  turns unsharp. I make small logo's 300x300px, sometimes I use imported .jpg or an Inkscapefilter on the background. Can someone help me. Lucienne
Title: Re: unsharp text after exporting to .png
Post by: brynn on June 19, 2018, 06:20:38 PM
Welcome Lucienne!

Oh wow - that tree trunk looks perfectly, totally realistic!!  Did you draw that originally in Inkscape?

When you say you sometimes use imported JPGs for backgrounds, do the JPGs already have text on them?  Or do you add the text later?  If they already have text on them, then you need to be very careful not to scale the imported image.

That text looks pretty sharp to me, as long as I'm looking at the full size.  If I zoom, it gets blurry.  But that's a known problem.  Zooming or scaling any raster format (PNG, JPG, GIF, TIFF, etc.) image will get blurry. 

If you need the PNG or JPG to be bigger (or smaller), you should scale it in Inkscape, and then export again.

Or is there a more subtle problem which I don't recognize?
Title: Re: unsharp text after exporting to .png
Post by: Lucienne van Dam on June 20, 2018, 12:24:38 AM
Hello Brynn,

I made the treetrunk in Krita, thanks for the compliment.

When I import the JPGs I import them without text, and put the text in, in Inkscape.

Maybe I expect to much from vector-text, and did not expect the blur when scaling to smaller size.
I was thinking I did something wrong, but I think this is wat is is.
Thanks for your repley, now I can continue drawing B-)

 :ty1:Lucienne
Title: Re: unsharp text after exporting to .png
Post by: Moini on June 20, 2018, 01:21:26 PM
What you're seeing is the effect of antialiasing. The text does not end at pixel borders, so pixels at its borders need to be colored in intermediate colors.
You can try to export at a much larger scale, and then use a different program to resize the image, which allows you to turn of antialiasing (but remember, this gives a pixeled appearance).
Inkscape currently doesn't have the option of suppressing antialiasing on export, but it will do so in the next major version.
Title: Re: unsharp text after exporting to .png
Post by: Lucienne van Dam on June 21, 2018, 03:30:59 AM
Hi Moini,

Thanks for your suggestion, I spent the whole morning trying different setting, no luck so far, but I will keep searching for information, and look forward to the new Inkscape nest major version.
 :D Lucienne
Title: Re: unsharp text after exporting to .png
Post by: brynn on June 21, 2018, 06:14:25 AM
Personally I would not consider not using anti-aliasing.  You would lose the nice clean lines.

I think the best answer in this case is just not to scale or zoom the raster images.  And instead, scale them in Inkscape, while they are still vector, and then export the specific size you need.

Or depending what you're doing with the images, you might be able to use the vector version.  While browser support for SVG is not 100%, for relatively simple images like you showed, I think most browsers would display it correctly.
Title: Re: unsharp text after exporting to .png
Post by: Lucienne van Dam on June 21, 2018, 07:22:06 AM
Oke, I will stick to anti-aliasing, scale as much in Inkscape.

The images are used for a Word press site, with a plug in I tried to upload the vector images but the result was very strange,
The text was staight instead of following the form a in the original, see atachements. What went wrong?
Title: Re: unsharp text after exporting to .png
Post by: Moini on June 21, 2018, 07:57:42 AM
Not sure what went wrong, but I can tell you how to fix:

Select the text, then do 'Path > Object to Path'. Done. If you want to keep the text editable, make a copy of it and put it on a layer that you then hide, or save the file under a different name.

(and what is meditating without meditating? Mindfulness?)
Title: Re: unsharp text after exporting to .png
Post by: Lucienne van Dam on June 21, 2018, 08:08:40 AM
I got it, and will try that trick, thanks for the suggestion!

"Meditating without meditating" comes from the site www.niet-weten.nl, (you need some Dutch to understand) my husband writes and I make the illustrations, I started drawing on paper 1,5 year ago, and picked up computerdrawing soon after, first with Medibang, than Krita, and the last month with Inkscape, a steep learningcurve :)
Title: Re: unsharp text after exporting to .png
Post by: Moini on June 21, 2018, 11:46:03 AM
I like your illustrations a lot, Lucienne. They are very good (probably no matter what tools you use). Congrats on your progress with digital drawing!
Title: Re: unsharp text after exporting to .png
Post by: Lucienne van Dam on June 22, 2018, 02:36:25 AM
Hi Moini, Thanks for your kind words, they make me smile:)