3 messages in net.java.dev.jna.usersRe: [jna-users] Some PNGs have a "bri...
FromSent OnAttachments
Shaun HaneyDec 17, 2007 2:15 pm.png, .png, .png, 1 more
Shaun HaneyDec 19, 2007 7:33 am 
Timothy WallDec 19, 2007 8:24 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Some PNGs have a "bright white washed out" look on UbuntuActions...
From:Timothy Wall (twal@dev.java.net)
Date:Dec 19, 2007 8:24:28 am
List:net.java.dev.jna.users

The different platforms use almost entirely different methods internally to achieve the alpha channel.

There is some something odd about the way java2d writes pixels out to an X11 drawable; the current implementation of setWindowTransparent simply lets Java blit the pixels. As you've noticed, there are some pixel combinations that look correct and some that don't. The app com.sun.jna.examples.X11AlphaMaskTest can help illustrate which pixels are rendered incorrectly. I've tried to track this down in the VM source but was never able to locate where/how the blitting actually happened.

I have a different version of the transparency that has no artifacts, since it writes the pixel information directly to the X11 drawable, but didn't have time to merge with the newer API usage. Run the AlphaMaskDemo in src/com/sun/jna/examples/AlphaMaskDemo.java and see if you see any artifacts with your PNG images.

On Dec 19, 2007, at 10:34 AM, Shaun Haney wrote:

Hi

Just to clarify, on Linux, I am running the AlphaTransparencyDemo and then dropping a PNG with a transparent background (clock.png) into the demo. The way the image is rendered is weird. Any part of the image that is white seems to become transparent and can only be seen when I put the image against a background that is not white. The image appears normal against a black background. This is entirely different from when I run the demo on Windows, where the transparent portions of the image appear transparent and the opaque portions of the image appear opaque. This is troublesome because we’re using JNA in one of our products with PNGs that have transparency and would like to be able to run it under Linux. It runs successfully under Macintosh and Windows.

Thanks,

Shaun Haney Software Test Engineer BASIS International Ltd. sha@basis.com From: Shaun Haney [mailto:sha@basis.com] Sent: Monday, December 17, 2007 3:16 PM To: use@jna.dev.java.net Subject: [jna-users] Some PNGs have a "bright white washed out" look on Ubuntu

--> Some of our images when used in the AlphaTransparency demo appear very bright white and washed out. Have any of you ever seen this problem? Is it my configuration?

Here are some shots of what I am talking about: Clock.png: The PNG with transparency used for testing. RunningInJnlp.png: A shot of this image running at the 100% setting. (100% opaque) Background.png: An image I put behind the clock to demonstrate the problem. Notice that the image looks almost right in the black areas, takes on the green or red in the red areas and is invisible in the white areas. RunningInVista: I tried the alpha demo in Vista with this same image as a reference point. This is working a lot better for me in Vista.

Thanks in advance!

Shaun Haney Software Test Engineer BASIS International Ltd. sha@basis.com