This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Decoding IMAGE_FMT_8BPP_COMP image created by pnmtoc



Hi,

I am using TivaWare Graphics Library on a tm4c microcontroller to implement menus to be seen in a coloured TFT. I am using the pnmtoc tool to created a compressed image to the background. To print that background use the TivaWare Graphics Library GrImageDraw.

But write now I need to decode the background image created by the pnmtoc tool, aiming to print a certain set of pixels of that background. I tried to understood the explanation on the TivaWare Graphics Library compressed IMAGE_FMT_8BPP_COMP, but I didn't understood. 

I need that background in a compressed way, since it is more suitable in terms of memory.

Can anyone help me?

Thanks in advance

Miguel 

  • Feel your pain - vaguely recall that function being bit difficult to understand.

    Further - we've long been in graphic display biz - thus we don't use any (single vendor) product.  Thus I'm more than a bit "blind" as regards this vendor's graphic coding.

    What may work for you is a search on both RLL encoding and BMP file structure.  In both cases - should you be able to design the screen background to have regularly repeated images - both methods achieve reasonable image compression.

    I'm uncertain if the graphic lib. here "borrowed" from those techniques - yet I'd bet you'd benefit from review of  both...