Jump to content

image


zhuantou215

Recommended Posts

There's no generalized way as you can load an image from almost any source. µGFX doesn't care how you get your image into memory. All it requires is to have byte level access to the image in order to decode it. But whether you manually wrote it into some external FLASH or whether you loaded it from an SD-Card through FatFS doesn't matter.

If you want to store images in your microcontroller's FLASH you can use ROMFS which is a file system that we wrote ourselves that allows loading images from the microcontroller's FLASH directly through the GFILE API as shown in many examples. The nice thing about ROMFS is that it comes with a tool named file2c that allows you to "convert" the image. All it does is taking any kind of data as input, interpreting it as binary data and creating one or more C arrays out of it including some file & directory information for easy handling during runtime and even easier handling during flashing as you can just #include the image data - no need to dick around with linker scripts or things like that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...