Wrong transparent background render in page layout file

Bug #1809845 reported by Hildo Guillardi Júnior
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Seth Hillbrand

Bug Description

To reproduce:

1) Insert an image with transparent background at the "page layout editor";
2) Verify, the image is added correctly with blank/white background;
3) Change the page layout of one Eeschema page using the template above;
4) The images became black.

Version:
Application: kicad
Version: 6.0.0-rc1-unknown-a3d8ab9~66~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-141-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: eeschema
Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :
description: updated
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Please include the offending worksheet file so I can confirm this bug. It looks like the new modern canvas implementation is getting the bitmap background wrong.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Attacked

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Kicad does not support transparent background in bitmaps:

- New draw engines do not support transparent background in bitmaps.
They are not optimized to draw bitmaps.
And (more annoying)
- Plot engines do not support transparent background in bitmaps.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Yes, but could be included the workaround of "make the transparent white" or "set the transparent color"? (since Eeschema and Page editor have different behavior to display it)

Revision history for this message
Nick Østergaard (nickoe) wrote :

@JP, it is strange that there is a discrepancy on how the pl_editor renders it and eeschema. I guess this is the most confusing part here.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

Not strange: pl_editor still uses the legacy canvas, that can displays transparency.

"set the transparent color" is not really a good option, because you don't know what color can be used: the background color can be different for eeschema and pcbnew

Revision history for this message
Nick Østergaard (nickoe) wrote :

Ahh, ok, I was not aware of this.

Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

Hour about use the environment color settled in each one (page editor, eeschema) to display these images background?
We should be worry about the exportation, because this issue was also affecting the PDF output from eeschema.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Is there no way to use transparency with either modern canvas (opengl or cairo)? It seems to me that it should be possible although I have no idea what it would take to implement it.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 3a3bbbb545feb1272ed53eaf7e4b54d534c3f48a
https://git.launchpad.net/kicad/patch/?id=3a3bbbb545feb1272ed53eaf7e4b54d534c3f48a

Changed in kicad:
status: Incomplete → Fix Committed
assignee: nobody → Seth Hillbrand (sethh)
Revision history for this message
Hildo Guillardi Júnior (hildogjr) wrote :

At https://bugs.launchpad.net/kicad/+bug/1814893 fix package is used:

pixel += ( wxALPHA_OPAQUE << 24 );
p[3] = wxALPHA_OPAQUE;

But in this, is used:
pixel += ( 0xff << 24 );
p[3] = 255;

The last appear to be a hard code. Just marking here for an update. Since the issues are correlated (and now, correlated with https://bugs.launchpad.net/kicad/+bug/1815216).

Changed in kicad:
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

Remote bug watches

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