FTDI Community

General Category => Discussion - Software => Topic started by: adouglas_ptl on September 01, 2020, 04:41:23 PM

Title: FT800 Bitmap Colour Inversion
Post by: adouglas_ptl on September 01, 2020, 04:41:23 PM
Hello,

I am using the FT800 chip and have successfully loaded and displayed various bitmaps, in my case icons for my GUI.  However, I have almost no space left in RAM_G and need to be able to invert the colours of some of the icons.  In my system the icons by default are a white outline on a black background but when selected as an option they need to invert and become a black outline on a white background.

Can anyone tell me a simple way to do this using the FT800 commands as I do not have space to load all the icons in again with the colours inverted.

Thanks in advance for any help!

Amy
Title: Re: FT800 Bitmap Colour Inversion
Post by: FTDI Community on September 02, 2020, 04:29:54 PM
Hello,

Could you please let me know which bitmap format you are using?
Could you also provide an example of the icons? Both standard and inverted.

Best Regards,
BRT Community
Title: Re: FT800 Bitmap Colour Inversion
Post by: adouglas_ptl on September 04, 2020, 09:02:01 AM
Hello,

Thank you for your reply. I am using RGB565 format and here is an example of one of my images, the first normal and the second inverted.

Thanks again!

Amy
Title: Re: FT800 Bitmap Colour Inversion
Post by: FTDI Community on September 04, 2020, 03:56:07 PM
Hello,

Thanks for providing an example of the icons.
As these are quite basic two colour images you have a couple options to achieve the inverted image.

The first and simplest option would be to use a bitmap format that uses less bits per pixel for these icon, this should allow you to fit both the normal and inverted icons into RAM_G. For example if you were to use L4 bitmaps these would take up 1/4 of the space in RAM_G that a RG565 bitmap would occupy.

The following should be useful for you:
AN_314 FT800 Advanced Technologies - Working with Bitmaps (https://brtchip.com/wp-content/uploads/Support/Documentation/Application_Notes/ICs/EVE/AN_314_FT800_Advanced-Techniques_Working-with-Bitmaps.pdf)

You could also look into using bitmap cells with L1/L4 bitmaps so that both the inverted and non inverted icon are loaded into RAM_G as one bitmap, please see the above Application Note.

The final option would be to use a bitmap format which supports the Alpha channel (such as ARGB2). This way you would create the icon with a transparent background, after which you can colour the arrow and background when placing the bitmap on your display.


Best Regards,
FTDI Community