Maker Pro
Maker Pro

General question about storing graphics!

24Volts

Mar 21, 2010
164
Joined
Mar 21, 2010
Messages
164
Hello,

I have a quick question about storing graphics in external flash memory. I have my own GL which is able to retrieve text, icons or pictures from an 8MEG flash and displays them on either a 1.5 " or 2.0" color LCD. Here's the thing though, when I am using the 1.5" LCD and I display a special icon it has to be a certain size. However if I display that same icon on the 2.0" LCD, it has to be slightly bigger. My question is, for us embedded guys that are using PICS with limited memory (comparing to today's memory in desktop computers) what are our options to do this.

I was stuck in storing that same icon in two different sizes in flash. Another option would be to store it in flash as the biggest size and according to the size required we palletize the icon to reduce it to any size we require and redisplay it on the LCD.

Is there such a utility or .c file that we can include in our code which resizes (or palletizes) graphics to a certain size so we can then display them.

ALl feedback is very appreciated.
Rob
 

24Volts

Mar 21, 2010
164
Joined
Mar 21, 2010
Messages
164
Hi saradalton,

Yes, but what I am trying to say here, is that I need to be able to resize graphic (or fonts for that matter) at ****run time***** within the MCU. So it goes like this:

The MCU loads a picture or a character font from flash. Then resizes it (Notice here... I need it resized without using a computer or the Internet) while the MCU is in run time. So then, I can redisplay it as the new size.

I am just wondering if there exists a .c file that I can include in my C project programming and use it to do this resizing on the fly.

Regards
Rob
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The simplest way is to display (say) every second pixel on every second row. This will display an image 1/4 sized.

If you display each pixel twice, and duplicate each row then it will be 4x the size.
 
Top