cancel
Showing results for 
Search instead for 
Did you mean: 

Loading a PNG Image from USB

Priyank
Senior

Hello, I would like to know if there are any methods to load PNGs/JPGs from a USB for the stm32 (I am on stm32F7). I currently imported lodepng but, it seems the malloc used by it is way too large for the device. The png I am loading is relatively small, 185 x 43.

unsigned err = lodepng_decode24(&img, &w, &h, file, fileSize);
	if(err)
	{
		return MEMORY_ERROR;
	}

 

2 REPLIES 2
Osman SOYKURT
ST Employee

Hello @Priyank ,

My colleague has answered a similar question few months before (same approach for USB and SD card) :
https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/using-sd-card-in-touchgfx-freertos-project/m-p/790174#M42758

I invite you to have a look at his answer.

Osman SOYKURT
ST Software Developer | TouchGFX