Problem about displaying a RGB565 framebuffer raw file

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hanqo
Posts: 2
Joined: 2015-07-18T03:23:04-07:00
Authentication code: 1151

Problem about displaying a RGB565 framebuffer raw file

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Problem about displaying a RGB565 framebuffer raw file

Post 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.
snibgo's IM pages: im.snibgo.com
hanqo
Posts: 2
Joined: 2015-07-18T03:23:04-07:00
Authentication code: 1151

Re: Problem about displaying a RGB565 framebuffer raw file

Post 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?
Post Reply