Sterling
Sterling
DIIDevHeads IoT Integration Server
Created by Sterling on 6/7/2024 in #middleware-and-os
How to Correct Inverted Colors When Converting Framebuffer Data to PNG with ImageMagick on OMAP35x?
I'm trying to convert raw framebuffer data /dev/fb0 on my OMAP35x board to a PNG image using ImageMagick's convert command. However, the resulting image screen.png appears incorrect. The The colors in the image are completely reversed, with negative values displayed. Here is the command I used:
convert -depth 8 -size 240x320 rgb:./screen.raw -swap 0,2 -separate -combine screen.png
convert -depth 8 -size 240x320 rgb:./screen.raw -swap 0,2 -separate -combine screen.png
I've verified that the framebuffer resolution is indeed 240x320 pixels. Is there an error in my convert command flags for capturing the framebuffer data with ImageMagick? Are there any specific considerations for handling framebuffer data on OMAP35x boards that might cause inverted colors during conversion? @Middleware & OS
3 replies