Optionally disable anti-aliasing for bitmap export

Bug #180612 reported by Christian
58
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Wishlist
Mc

Bug Description

I remember how the exportation in inkscape was ugly back in the days before it used antialias.

Now, bitmap exportation is very nice, smooth & antialiased.

However, it would be very nice to have a checkbox to disable antialias on exportation because while antialias is good when used for display, it's less pleasant when it comes to print.

If there's already a way to do it, i'd like to know how, and I'm really sorry for the disturbance

Revision history for this message
Mercury (mercury13) wrote :

I won't change status because I don't know if the report is false. But +1, this feature would be good.

Revision history for this message
nightrow (jb-benoit) wrote :

You should be able to do it by setting the following option :
inkscape properties / misc / over-sampling -> none
(sorry if the names are not exactly accurate, i just translated it from my regionalised version of inkscape)

this was known to be buggy, so don't hesitate to test it and report if the current implementation works for you

Ryan Lerch (ryanlerch)
Changed in inkscape:
status: New → Fix Released
status: Fix Released → Invalid
Revision history for this message
Tom Davidson (tjd-mit) wrote :

That pref has no effect on exported bitmaps, currently--see bug 168346

Revision history for this message
Tom Davidson (tjd-mit) wrote :

That preferences should be fixed soon (I submitted a patch), but that setting only controls antialiasing for bitmaps, not for all objects... So unmarking this as a dupe...

Revision history for this message
ChrisH (cshandley) wrote :

Inkscape desperately needs an option to disable anti-aliasing for Export Bitmap, because the results look TERRIBLE when used in a printed newspaper.

(I use JPG not PDF, because generated PDFs do not come even close to meeting the stringent PDF requirements of newspapers.)

Revision history for this message
ChrisH (cshandley) wrote :

Follow-up to my above comment: I am no-longer so sure that the problems I was having were entirely due to anti-aliasing, BUT being able to disable anti-aliasing would certainly still improve printing in newspapers.

Revision history for this message
JEis (jesse-mostancient) wrote :

I've run into the same limitation. As noted above, disabling over-sampling only applies to bitmaps, not to vector objects. Allowing this setting to effect all objects in an exported PNG is a crucial option for print output. Tonal intermediation makes a noticeably ragged edge in print.

Changed in inkscape:
importance: Undecided → Wishlist
status: Invalid → Confirmed
Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote :

I'm re-opening this since it was demonstrated that disabling over-sampling appies only to bitmaps, and what is required in the original report is the ability to de-activate the antialiasing of vectors as well, in order to get cleaner edges in print output (i.e. offset printing, where font antialias gets dithered in the plates).
Since Inkscape's PDF exporter is not ready yet for press work and Scribus' SVG importer doesn't support inkscape's SVG completely, bitmap export is still a reliable way to send files to print shops (specially when other tools such as CMYKtool or Separate+ are used to prepare the CMYK separations). In that case, the ability to disable antialiasing in the exporter would be a big plus.

Revision history for this message
JEis (jesse-mostancient) wrote : Re: Jesse no longer receives email at this address

mutemanifold.com is being shut down. Jesse's new email address is: (<email address hidden>). Please update your address books.

Thanks,

Jesse

www.mostancient.com

Revision history for this message
Guillermo Espertino (Gez) (gespertino-gmail) wrote : Re: antialias exportation disabling

Converted back to a bug. The answer only covered a part of the problem and the rest is indeed a program limitation, so I'm moving this issue to a wishlist item.

Revision history for this message
su_v (suv-lp) wrote :

@Gez - please revert if the edited summary doesn't correctly summarize this report.

summary: - antialias exportation disabling
+ Optionally disable anti-aliasing for bitmap export
Revision history for this message
JEis (jesse-mostancient) wrote : Re: Jesse no longer receives email at this address

mutemanifold.com is being shut down. Jesse's new email address is: (<email address hidden>). Please update your address books.

Thanks,

Jesse

www.mostancient.com

Revision history for this message
JEis (jesse-mostancient) wrote :

Very sorry for the spam. Email has been updated.

su_v (suv-lp)
tags: added: bitmap exporting
tester (tester-5)
summary: - Optionally disable anti-aliasing for bitmap export
+ disable anti-aliasing for bitmap export
Revision history for this message
tester (tester-5) wrote : Re: disable anti-aliasing for bitmap export

Related request here [1], converging many requests actually. Always-on-transformations such as always-antialias-on-in-exportation is stupid because it can mean an extra -data-loss, this kind of operation should be done in the deployment, not during development. I suggest to preview the other feature -requests there [1], solving one of them should be done in the combination of the others.

[1] http://graphicdesign.stackexchange.com/questions/8021/how-to-batch-export-layers-of-inkscape-generated-svg-file-to-bitmap-for-sprites

su_v (suv-lp)
summary: - disable anti-aliasing for bitmap export
+ Optionally disable anti-aliasing for bitmap export
Revision history for this message
Stéphane Gourichon (stephane-gourichon-lpad) wrote :

You might want to comment on bug 270909, where someone having basically same problem offers opposite solution.

What do you think about providing two different "bitmap oversample" settings, one for on-screen edit time and one for bitmap export ? That seems simple enough and cover the needs for people who prefer high antialiasing as well as those who need none at all in their context.

What do you think ?

Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

I know being able to turn off the anti-aliased when exporting PNGs would be a major plus for me as well. Would save me a lot of time. Right now, most of the time I'm converting to an EPS, importing it into GIMP with anti-aliased turned off, and then saving it as a PNG. Would love to do all of this inside of Inkscape instead.

Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

I've just found a work around, but you need to have GIMP installed as well to make use of this. Still would be easier to be able to do it all inside of Inkscape on the export screen for png files..

1. Open your *.svg file in a text editor.
2. Find the first object in your file that has style info for an object and add this line either above or below it (doesn't matter where, just has to be in the object and don't forget to hit enter after you paste it into your file): shape-rendering="crispEdges"
3. Continue doing step 2 till you have added that line to all the items in your svg file.
4. Save your file.
5. Import your now modified svg file into GIMP.
6. Select the size you want on the import screen.
7. Now, export your file as whatever format (*.png, *.bmp as examples) from inside of GIMP.

What happens:
You now have a non anti-aliased image file in either *.png or *.bmp format!

Doing this might take awhile if you have several items in your file, but if you really need the anti-aliased completely gone, this is the only way to do so till Inkscape can do it itself!

Also, one note, if you have text in your file, you'll need to convert it to a path first, otherwise this will not work on the text (will work on everything else). Also, this even works on filters, well, at least the blur for sure. ;)

Revision history for this message
Albin Olsson (albin-olsson) wrote :

Leveraging rickmastfan67 work around, I wrote a small shell script to create a non-antialiased png from an inkscape svg. It requires ImageMagick. Here it is in case it is useful to someone else:

#!/bin/sh
file=${1:?Need filename argument to convert}
sed '/style=/ishape-rendering="crispEdges"' $file > $file~
convert $file~ $(echo $file | sed -e 's/svg$/png/')
rm -f $file~

Revision history for this message
Rainer Rillke (rillke) wrote :

> shape-rendering="crispEdges"

Thanks! Works like a charm. And because it's so painful to always insert that attribute by hand, this is now an option at tools.wmflabs.org/convert/ - which is using rsvg, though. Source code (PHP, using DOMDocument and XPath) is, of course, available.

According to https://www.w3.org/TR/SVG11/painting.html#ShapeRenderingProperty "user agent might turn off anti-aliasing for all lines and curves or possibly just for straight lines which are close to vertical or horizontal". So unfortunately, I fear it is not a bullet-proof way to get rid of anti-aliasing.

Revision history for this message
Mc (mc...) wrote :

Pushed a fix for an export setting to 15391.

Changed in inkscape:
status: Confirmed → Fix Committed
assignee: nobody → Mc (mc...)
milestone: none → 0.93
Revision history for this message
rickmastfan67 (rickmastfan67) wrote :

Hope that might be able to be sneak into 0.92.1, only if 0.93 is going to take another 2 years like it did between 0.48.5 & 0.91.

Revision history for this message
ScislaC (scislac) wrote :

Point releases are bugfix releases, it will not be backported to the 0.92.x series.

Max Gaukler (mgmax)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.