Imported bitmap has posterized colours on <100% opacity

Bug #577012 reported by Michelle Butler
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
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.

Revision history for this message
Michelle Butler (gmichellebutler) wrote :
Revision history for this message
Michelle Butler (gmichellebutler) wrote :
Revision history for this message
Michelle Butler (gmichellebutler) wrote :
Revision history for this message
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
Revision history for this message
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
Revision history for this message
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 (…)»

Revision history for this message
George Yohng (georgeis) wrote :

With just black and white image. (Screenshot)

Revision history for this message
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.

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

not reproduced with Inkscape 0.47 r22583 on OS X 10.5.8

-> regression

tags: added: regression
Revision history for this message
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)
Revision history for this message
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)

Revision history for this message
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

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

sorry - typo:

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

Revision history for this message
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>

Revision history for this message
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.

Revision history for this message
Jaspervdg (jaspervdg) wrote :

Fixed in revision #9426.

Revision history for this message
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).

Revision history for this message
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').

Revision history for this message
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)
Changed in inkscape:
status: Confirmed → Fix Committed
Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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