Page 1 of 1

Problem about displaying a RGB565 framebuffer raw file

Posted: 2015-07-18T03:35:33-07:00
by hanqo
Hi,

I'm currently doing a project about framebuffer displaying stuff. I need to get screenshot and cat the /dev/fb2 (which is for HDMI fb in my case) to a test.raw. It works when I cat back to fb2 but not working if I use the following command to display it on my linux machine.

display -size 1440x1080 -depth 16 rgb:test.raw

It displays something, BUT, it is a disordered image which sampled each side with several copies and mixing to each other. I'm quite confused if some parameter is wrong to set. Could anyone help me? Thanks a lot!

Regards,
Han

Re: Problem about displaying a RGB565 framebuffer raw file

Posted: 2015-07-18T04:04:49-07:00
by snibgo

Code: Select all

display -size 1440x1080 -depth 16 rgb:test.raw
Your command declares the file contains 1440x1080 pixels, each with three channels, where each channel is 16 bits.

From your title "RGB565", I guess the three pixels are really squished together into 16 bits. I don't know how to tell IM that this is the case.

Re: Problem about displaying a RGB565 framebuffer raw file

Posted: 2015-07-18T04:25:32-07:00
by hanqo
snibgo wrote:

Code: Select all

display -size 1440x1080 -depth 16 rgb:test.raw
Your command declares the file contains 1440x1080 pixels, each with three channels, where each channel is 16 bits.

From your title "RGB565", I guess the three pixels are really squished together into 16 bits. I don't know how to tell IM that this is the case.
Thanks for your reply.

The resolution is correct.
Yes it's RGB565, actually it's defined with RGBA565 which A is 0 in this case. Is it the right parameter to set for this case?