Imported bitmap has posterized colours on <100% opacity

Bug #577012 reported by Michelle Butler on 2010-05-07
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Jaspervdg

Bug Description

This is possibly related, but not the same, as bug #284147.

After I set the opacity of an imported bitmap (tried png and tif), the colours becomes posterized. This is onscreen, as well as when exported. The more transparent, the more posterized it becomes, but I found that the effect somewhat reverses below 5% opacity.

I made a sample svg from a bitmap with a good range of colours. I'll attach it here, along with a screenshot from inside inkscape as well as the exported image.

I have the latest nightly build (Inkscape 0.47+devel r9389) running on WindowsXP SP2.

jazzynico (jazzynico) wrote :

Confirmed on Windows XP, Inkscape bzr rev. 9381.

Workaround: insert your image in a group (Ctrl+G) or layer, and then apply the opacity to the group.

Changed in inkscape:
importance: Undecided → Medium
status: New → Confirmed
tags: added: color
removed: colors colours imported opacity posterised
su_v (suv-lp) wrote :

Export to PDF produces yet a different result, but the images with opacity applied directly seem to be correct in the exported PDF file (Inkscape 0.47+devel r9495 on OS X 10.5.8).

tags: added: renderer
su_v (suv-lp) wrote :

another related report?
Bug #389130 “Inkscape PNG transparency display appearance does not match export and other standard applications”:
«The OBJECT transparency of an imported PNG does not match the OBJECT transparency of a standard vector object such as a rectangle. The PIXEL transparency of an imported PNG correctly matches the OBJECT transparency of a standard vector object. (…) applies to Inkscape's drawing area and bitmap export. Saving as PDF or Cairo PNG will correctly (…)»

George Yohng (georgeis) wrote :

With just black and white image. (Screenshot)

George Yohng (georgeis) wrote :

Note, I have just filed a new bug #580079 about Bitmap Tracing error, and it could be possible that these two bugs are related.

su_v (suv-lp) wrote :

not reproduced with Inkscape 0.47 r22583 on OS X 10.5.8

-> regression

tags: added: regression
su_v (suv-lp) wrote :

not reproduced with r9349
reproduced with r9350

Jasper, could you take a look at this?

Changed in inkscape:
assignee: nobody → Jaspervdg (jaspervdg)
Jaspervdg (jaspervdg) wrote :

Thanks for pinning it to a specific revision, but cannot reproduce for the moment. I am updating to the latest revision to see if that changes things. And have you tried r9358 or later? (r9350 had a very stupid bug which could cause things like this)

su_v (suv-lp) wrote :

When testing older revisions I still have archived to narrow down when this started, I compared these revisions:

9420
9410
9395
9364
9366
9384
9388
9366
9359
9349 -> this doesn't show this bug
9350
-> has this bug

and I still see the posterized rendering with a completely new build of 9424 (after upgrading to GTK+ 2.20.1)

and I tested again today:
9424, 9358, 9350 show the bug
9358
is ok

su_v (suv-lp) wrote :

sorry - typo:

and I tested again today:
9424, 9358, 9350 show the bug
9349
is ok

su_v (suv-lp) wrote :

@Jasper - did you try with the example from the duplicate report too?

SVG file:
<http://launchpadlibrarian.net/48452392/eek.svg>
Screenshot comparing 0.47 - trunk:
<http://launchpadlibrarian.net/48452386/images-hosed.png>

Jaspervdg (jaspervdg) wrote :

Just found out that I accidentally used an old version of Inkscape... But I just did btool clean, so I can't test at the moment, as soon as it is finished I'll probably be able to reproduce the problems though and I'll have a go at fixing them.

Jaspervdg (jaspervdg) wrote :

Fixed in revision #9426.

Jaspervdg (jaspervdg) wrote :

BTW, confirmation would be great :) And I've checked that this indeed also fixes bug #580588, bug #284147 still persists though (and appears to be not directly unrelated, although I definitely will have a closer look).

su_v (suv-lp) wrote :

Fix confirmed with Inkscape 0.47+devel r9426 on OS X 10.5.8

Tested with the example files from duplicate bug #580588 (comparing on-canvas rendering to 0.47) and this bug #577012 (comparing rendering on-canvas, PNG export, Cairo PNG and PDF of unchanged 'Opacity bug.svgz').

su_v (suv-lp) wrote :

@Jasper - to clarify: The fix confirmed is about the 'posterized' colors of bitmap images with object opacity. As you mention, the rendering difference on-canvas described in bug #284147 still persists in r9426.

Jaspervdg (jaspervdg) on 2010-05-18
Changed in inkscape:
status: Confirmed → Fix Committed
su_v (suv-lp) wrote :

Changing to 'Fix released' because the bug was only present in the development builds.

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

Duplicates of this bug

Other bug subscribers