EPS export with transparent layers is blurred, and imprecise clipping in PDF export

Bug #427226 reported by Alexey
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

It is about Inkscape 0.47pre2 on Snow Leopard.

When there is a layer whose opacity is set to less than 100%, EPS exported file is blurred (rasterized?).
Drawings that are in layers with opacity 100% are blurred too.
I believe that this problem was not present in Inkscape 0.46.

I have attached the original SVG file and EPS, PS, and PDF exports.
Direct PDF export is correct, but seems that the clipping to the drawing was not very precise.
In all 3 export the options were:
Convert texts to paths NO
Rasterize filter effects NO
Export area is drawing YES
Export area is page NO

Thank you.

Alexey.

Revision history for this message
Alexey (alexey-muranov) wrote :
tags: added: exporting layers
removed: export layer transparency
Revision history for this message
Alexey (alexey-muranov) wrote :

the bug is still present in Inkscape-0.47pre3-2.LEOPARD+

Revision history for this message
theAdib (theadib) wrote :

this is probably an cairo bug as the same code is used for exporting pdf, ps and eps. Adib.

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

related: bug #336638 “PDF export adds unnecessary clipping paths”

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

Both PS and EPS are rasterized due to opacity less than 100%. This is because PS does not support transparency.

From the SVG file:

     style="opacity:0.99">

and

       style="opacity:0.98999999999999999;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"

Revision history for this message
Alexey (alexey-muranov) wrote :

but layers with opacity 100% are rasterized too

Revision history for this message
Adrian Johnson (ajohnson-redneon) wrote :

A good method of determining if bugs like this are an Inkscape or cairo bugs is with the cairo-trace utility.

http://www.cairographics.org/FAQ/#profiling

Using a recent cairo from git it is simply a case of running:

cairo-trace inkscape --export-ps=file.ps file.svg

The export should be done from the command line to avoid tracing all the cairo calls that draw the gtk widgets.

Then you will get a file like inkscape.23639.trace with a log of all the cairo functions calls and their arguments.

To find out the cause of unnecessary rasterization, check the log with the list of PS supported features at bottom of this page:
http://www.cairographics.org/documentation/using_the_postscript_surface/

It should be as easy as grepping for cairo_mask, set_operator, paint_with_alpha, and rgba (and check the alpha).

Revision history for this message
bamyasi (iadzhubey) wrote :

Just wanted to add that I am also having this problem and that it never happened to me with inkscape 0.46. With 0.47 some areas of the same image are blurred and/or disappear when exporting to EPS, PS, or PDF.

Tried inkscape 0.47 on Ubuntu 9.10 and Mac OS X 10.6, same exactly problem persists. Also tried with the latest nightly build of 0.47 (trunk) compiled on Ubuntu 9.10 -- same thing.

Very annoying. I am pretty sure none of the layers were rasterized before when I exported to EPS using inkscape 0.46 but I'll have to check and it's not easy since I no longer have 0.46 installed on any of my computers. The image in question was originally created in Mac OS X version of Illustrator and has plenty of transparent layers...

Revision history for this message
bamyasi (iadzhubey) wrote :

Run a few tests, have replaced every opacity setting in the original svg file with style="opacity:1" and attempted to export it again. Results is still a corrupted image -- although it does not show blurring any more, now instead it has some banding and all non-transparent layers simply cut off of the top 2/3 of the picture.

Anyone interested in this particular drawing file? I can attach it if so.

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

@bamyasi -
> Anyone interested in this particular drawing file? I can attach it if so.
could you attach the original file, your edited version and the generated PDF?

Revision history for this message
ChrisH (christopher-harte) wrote :

Hi,

I have been having trouble with this problem as well and found this post that seems to be related:

http://notimetolouse.blogspot.com/2009/05/cairo-and-eps-format-short-detective.html

As mentioned above in this thread, if anything in the SVG file is translucent, Cairo goes into "Fallback" mode and rasterises the whole image.

I managed to correct a few of my files that suffered from this by using "Select all in all layers" while running inkscape and setting the opacity of both fill and stroke to 100%.

I wonder if it would be worth adding a setting to the EPS export dialogue that would allow us to filter all graphic objects and set their opacity to 100% before passing the result to Cairo...

Chris

Revision history for this message
Beluga (buovjaga) wrote :

Still repro.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15054 (GTK3)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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