Hi Grissom,
Thanks for the reply.
I wondered about image_hdc and where the image files came from. If I follow the link you provided it tells me I dont have permission, and I can't find the link in the post using the other link you provided. Could it be made available from one of the other sites such as
code.google?
Using image_hdc also has it's problems. The hdc image appears to be a raw bitmap, therefore the file size would be 768000 bytes for 800 x 480 x 16bpp. This would use 768K flash, 768K RAM and a further 768K RAM since the pixel data is copied again, although this could be eliminated. Images must be converted at compile time, which is okay for my current situation but it would not be an option for use with images loaded from an SD card, or downloaded. A new set of images would need to be created and maintained to support any additional display formats.
The method I was proposing could load the image from a png (or any other format) file, in my case this file is only 98K. This would decompress to 1.5M but then this memory could be freed after the image was converted to the display format. Therefore using only 98K flash, 98K RAM, 1.5M RAM (temporary) and 768K RAM for the final image. A total of 964K per image and a temporary 1.5M buffer, compared to 2.3M per image. Images could be loaded at runtime or precompiled as part of the binary image. The same set of images could be used on multiple display formats.
I guess it is a tradeoff between memory usage vs flexibility + on the fly conversion.
I will look more at image_hdc and hopefully I will be able to download the converter, but I am still considering creating a buffered dc or modifying dc_buffer.
Regards,
Rob