Jump to content

Recommended Posts

Posted

Assuming your image is available via the GFILE module, you can just use the gdispImageXxx() API from here:

#include "gfx.h"

int main(void)
{
	gImage myImage;

	// Initialize uGFX and the underlying system
	gfxInit();

	// Set up IO for our image
	gdispImageOpenFile(&myImage, "my_image.bmp");
	gdispImageDraw(&myImage, 0, 0, gdispGetWidth(), gdispGetHeight(), 0, 0);
	gdispImageClose(&myImage);

	while(1) {
		gfxSleepMilliseconds(1000);
	}

	return 0;
}

You can find a ready-to-run demo under /demos/modules/gdisp/images.

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...