[vtk-developers] PNGWriter now writing out a black background after 17 Oct.

Andrew Maclean andrew.amaclean at gmail.com
Fri Nov 11 01:57:53 EST 2016


Hi all ... again.
 I just tested Ken's suggestion of setting alpha bitplanes to 8 in the
default settings for vtkRenderWindow and all tests pass as before. On my
Kubuntu setup I get 1673/1673 tests passing.

With respect to the python test, if I comment out def testWIFRGB(self) in
Kubuntu I get an image with a transparent background as expected. In
Kubuntu 16.10 I suspect there is some issue with Plasma when in interactive
mode as I get a lot of window resets.

So perhaps this is the way to go at this stage, just change line 62 in
vtkRenderWindow.cxx to:
this->AlphaBitPlanes = 8;
and maybe add a test.

I suspect that the only a few linux users may notice something if they have
inadvertently used vtkWindowToImageFilter.SetInputBufferTypeToRGBA() when
they meant to use vtkWindowToImageFilter.SetInputBufferTypeToRGB() .

What do people think?

If everyone is pressed for time, I could probably do something on Monday as
my weekend starts tomorrow.

Regards
   Andrew


On Fri, Nov 11, 2016 at 12:06 PM, Andrew Maclean <andrew.amaclean at gmail.com>
wrote:

> Hi All,
>
> I had to switch the display manager back to lightdm (in order to log into
> Ubuntu). Look at what I get when running either Kubuntu or Ubuntu.
>
> For both Kubuntu and Ubuntu, for the TestWIFPNGRGBA_*.png files, I would
> have expected a 1/4 sphere with a transparent background. Instead Kubuntu
> has a transparent background with a few pixels that are not transparent,
> whilst Ubuntu has a 1/4 sphere with a non-transparent background.
>
> I have a GTX980 card and the OpenGL version is 4.5.0 NVIDIA 367.57
>
>
> On Fri, Nov 11, 2016 at 7:11 AM, Andrew Maclean <andrew.amaclean at gmail.com
> > wrote:
>
>> David,
>>
>> What you are seeing in the Mac is what I see in Windows and what I would
>> expect.
>>
>> On Kubuntu 16.10 I get the attached RGBA image - trasnparent with a few
>> scattered pixels.
>>
>> if I comment out def testWIFRGB(self): in the code, I get an RGBA with a
>> blue background (I expected a transparent one). In other words it's the
>> same as the RGB image. Interestingly, when I was running Unbuntu I got this
>> image instead of the Kubuntu version.
>>
>> Attached is the output from running the program in Kubuntu 16.10.
>>
>> Andrew
>>
>> On Fri, Nov 11, 2016 at 1:24 AM, David E DeMarle <
>> dave.demarle at kitware.com> wrote:
>>
>>> In the RGBA version the blue background _should_ be invisible. The
>>> question in my mind is why doesn't your Linux build not show anything in
>>> the foreground? Can you share the png's made by your ubuntu build?
>>>
>>> On my Mac for example, for both GL1 and GL2, RGB has a blue background,
>>> RGBA's is transparent.
>>> That is expected. The image contents are the same at every pixel except
>>> that the RGBA'a alpha channel has value 255 for foreground and 0 for
>>> background pixels.
>>>
>>>
>>> David E DeMarle
>>> Kitware, Inc.
>>> R&D Engineer
>>> 21 Corporate Drive
>>> Clifton Park, NY 12065-8662
>>> Phone: 518-881-4909
>>>
>>> On Wed, Nov 9, 2016 at 5:18 PM, Andrew Maclean <
>>> andrew.amaclean at gmail.com> wrote:
>>>
>>>> Hi Guys,
>>>>    For me this still appears to be the case. Try running the attached
>>>> test code.
>>>> In Windows and Linux, TestWIFPNGRGB.png are the same.
>>>> In Windows TestWIFPNGRGBA.png has a transparent background, whilst in
>>>> KUbuntu no image is produced just a transparent background.
>>>>   Are you able to replicate this behaviour?
>>>>
>>>> Andrew
>>>>
>>>> On Wed, Nov 9, 2016 at 10:22 PM, David E DeMarle <
>>>> dave.demarle at kitware.com> wrote:
>>>>
>>>>> Andrew, does this still appear to be the case in the 7.1 release
>>>>> branch? If so mind filing a quick issue on gitlab with the 7.1 milestone
>>>>> tag?
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ___________________________________________
>>>> Andrew J. P. Maclean
>>>>
>>>> ___________________________________________
>>>>
>>>
>>>
>>
>>
>> --
>> ___________________________________________
>> Andrew J. P. Maclean
>>
>> ___________________________________________
>>
>
>
>
> --
> ___________________________________________
> Andrew J. P. Maclean
>
> ___________________________________________
>



-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20161111/3c9d45f2/attachment.html>


More information about the vtk-developers mailing list