Skip to main content
JeffSm
Associate II
March 26, 2021
Question

How to store jpeg image in Flash memory of STM32?

  • March 26, 2021
  • 6 replies
  • 2722 views

I have a JPEG image, is there any way to store jpeg image in the internal flash of STM32?

And how to read the image?

This topic has been closed for replies.

6 replies

MM..1
Super User
March 26, 2021

rename to bin use bin2header file and add as const array to project. You can read as any other array.

But image decoding need lib code. Some graphics software can store as .h or .c file

Tesla DeLorean
Guru
March 26, 2021

As a byte array, with a pointer? Or via the array / sizeof(array) to the function processing the data.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
JeffSm
JeffSmAuthor
Associate II
March 26, 2021

Thanks. I am clear with storing the image as a const array using header file.

But not sure how exactly to decode it in JPEG format to read it? Which library to use to decode JPEG image?

MM..1
Super User
March 26, 2021

JPEG can be handled with or without hardware accelerating, you need use LIBJPEG . (Part in CubeMX)

SVIDY.1
Visitor II
March 8, 2023

May i know how to use libjpeg . As i am working on send an image data from stm32f407zgt6 to phone through bluetooth can you please help me ...