Page 1 of 1

Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 11:00 am
by stubbornthings
I'm trying to change the alpha on an image for my project that runs on linux with a touch screen display. It works fine when I simulate the project in Windows development, but the alpha will revert back to 255 when I run on target. I've tried using png, gif, and jpeg.

The two images below show how it appears when I run the project. The first shows how it looks when I run the app during simulation. The second is a photo of how it looks on the target. The image is the checkmark in the top application bar. It's bright white when alpha is set for 255.

Please explain what I might be doing wrong? Thank you.

Re: Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 11:14 am
by rdowdall
Hello

Could you post what runtime you are using on the Linux device, and what the graphics setup is?

Thanks,
Rodney

Re: Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 12:31 pm
by stubbornthings
Hi Rodney,

The runtime is linux-imx6yocto-armle-fbdev-obj. Can you clarify what you mean by graphics setup? Still a newbie. :?

Thanks.

Scott B.

Re: Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 1:32 pm
by rdowdall
Hello Scott

Sorry, I should have been a little more clear on that point. What I was asking is what is the screen setup for the device. So specifically, what is the resolution and the bit depth that the screen is using. Because you are using the fbdev, you will probably want to run an application such as fbset to get this information.

Thanks,
Rodney

Re: Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 2:11 pm
by stubbornthings
Rodney, here is the info I received after running fbset. Will this work?

mode "800x480-60"
# D: 33.260 MHz, H: 31.496 kHz, V: 59.993 Hz
geometry 800 480 800 480 16
timings 30066 88 40 33 10 128 2
rgba 5/11,6/5,5/0,0/0
endmode

Thanks,

Scott B.

Re: Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 2:22 pm
by MikeMarchand
Hi Scott,

Try this command,
fbset -depth 32

This will change your framebuffer to 32-bit depth. I believe you have encountered a bug that occurs with 16-bit framebuffers, by changing your framebuffer to 32-bit you should no longer encounter the issue.

Cheers,
Mike

Re: Image and Alpha not working with Linux

PostPosted: Fri Oct 13, 2017 3:38 pm
by stubbornthings
Hi Mike,

That did it.

Thanks again,

Scott B.