trunk: PDF/PS/EPS export of filtered objects include copy of unfiltered object on top (rev >= 13700)

Bug #1414835 reported by su_v on 2015-01-27
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
jazzynico

Bug Description

PDF export of filtered objects (rasterized) are overlaid with a copy of the original vector object (unfiltered).

Steps to reproduce:
1) launch trunk (default prefs, default document)
2) draw a rectangle
3) apply a filter effect (simple blur, or one of the presets)
4) save
5) save a copy as PDF, default export settings (rasterize filter effects at 96dpi, export page area)

Expected result:
The appearance of the filtered object in the PDF file is close to how it looks in Inkscape on-canvas

Actual result:
On top of the filtered object (embedded raster image), there is a duplicate of the original vector object, thus (if using solid fill colors) hiding most areas of the rasterized filtered object.

Reproduced with Inkscape 0.91+devel r13876 on OS X 10.7.5 (using cairo 1.14.0).

Based on tests with archived builds:
- not reproduced with rev <= 13699,
- reproduced with rev >= 13702;
it seems that the regression is related to the changes in rev 13700:
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/changes/13702>

13700: Removed SP_USE/SP_IS_USE Gtk-ish macros and cleaned affected files.
<https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13700>

Also affects PS/EPS export.

su_v (suv-lp) wrote :

Test case ('Filters > Textures > Watercolor').

su_v (suv-lp) wrote :

Exported PDF file (filter effects rasterized at 96dpi, export area page).

description: updated
description: updated
su_v (suv-lp) on 2015-01-27
summary: - trunk: PDF export of filtered objects include copy of unfiltered object
- on top (rev >= 13700)
+ trunk: PDF/PS/EPS export of filtered objects include copy of unfiltered
+ object on top (rev >= 13700)
description: updated
su_v (suv-lp) on 2015-01-27
description: updated
jazzynico (jazzynico) wrote :

Reproduced on Windows XP (32bits), Inkscape trunk rev. 13901.

Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.92
status: New → Triaged
jazzynico (jazzynico) wrote :

Patch attached, tested on Windows XP (32bits), Inkscape trunk rev. 13901.

Note that I'm not sure at all the patch is the correct fix. Please test and review!

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
status: Triaged → In Progress
insaner (insaner) wrote :

Patch works beautifully!! THANK YOU!!

linux fc15, r13850
pdf 1.5 @150dpi
pdf 1.4 @150dpi

ps 3 @150dpi
ps 3 @96dpi

It does however expose a few issues for me, I'm not sure if they are related to this, but the objects that previously didn't render properly, are rendered a bit blurry in the PS.
If they have rotation transforms, then they are rendered kind of blurry in the pdf as well (but not in inkscape).

Probably related to: bug #1414214.
Of note, I am using the workaround of applying the filter to a wrapper group with no rotation, while the objects inside might be rotated. Applying the filter directly to the rotated object or group results in blurry rendering, like the PDF rendering mentioned above.

insaner (insaner) wrote :

I narrowed it down to the simplest case of flowed text vs unflowed text. I couldn't find an easy enough way to reproduce, but inspecting the file might shed some light.

Pdf seems to render fine, PS renders blurriness in one, and not the other.

su_v (suv-lp) wrote :

On 2015-03-09 15:31 (+0100), insaner wrote:
> I narrowed it down to the simplest case of flowed text vs unflowed
> text. I couldn't find an easy enough way to reproduce, but inspecting
> the file might shed some light.
>
> Pdf seems to render fine, PS renders blurriness in one, and not the
> other.

Sorry, but I don't see how this would be related to the specific regression tracked here.

su_v (suv-lp) wrote :

On 2015-03-09 15:31 (+0100), insaner wrote:
> Pdf seems to render fine, PS renders blurriness in one, and not the
> other.

Besides the undisclosed viewer used to "verify" the "faulty" generated PostScript file (which btw is identical (source-wise) when exported with r13699 (not affected by the regression tracked in this report) and patched latest r13979), your "blurry" text objects use a reduced object opacity which triggers a (page-sized) rasterization by inkscape&cairo for PostScript-based exports (PostScript does not support transparency). AFAICT neither really a bug (a imitation in the chosen export format) nor related to the regression (of filtered objects) tracked in this report.

insaner (insaner) wrote :

Ok, I can confirm that the blurriness in the above mentioned case (comment #6) (using Okular, sorry I didn't mention that) is due to some transparency in the objects that I didn't realize was present.

The issue of rotation transforms leading to blurry renders in both pdf (adobe reader in linux fc15) and ps, remains, and like I said, I'm not sure if they are related to this since it happened to coincide in my case that it was the same objects that were affected by the "copy on top" rendering that are now rendered blurry, and not other objects. In any case, if I can figure out what's going on, I will file a bug report or comment in the relevant existing bug report. Sorry for the annoyance. The patch works as intended for me, with no further negative effects (no crashes). Thanks again

jazzynico (jazzynico) wrote :

Patch committed trunk rev. 14010.

Changed in inkscape:
milestone: 0.92 → none
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers