Jump to content

Recommended Posts

Posted

Hello, 

I try to use a pixmap on a background without success.

i have an image preloaded in myimage and i imagined that the next sequence load it in pixmap but it looks like that it reads pixmap. My question is how to load a file into a pixmap ?

mypixmap = gdispPixmapCreate(CONTAINER_WIDTH, CONTAINER_HEIGHT);
 
 gdispImageOpenMemory(&myimage, gdispPixmapGetMemoryImage(mypixmap _selection));
Posted

You don't need a pixmap in this case. You can simply cache the image using gdispImageCache(). A cached image is stored as a decompressed bitmap just like it would in the pixmap with the simple benefit that in some cases, some really basic RLE will be applied that decreases the image size without having a real impact on the rendering performance.

To answer your question anyway: You render to a pixmap like you would to any other display. A pixmap is nothing but a virtual display. You use all the normal GDISP rendering calls. Therefore, you can render an image to a pixmap using the regular gdispGImageDraw() function. The wiki demonstrates rendering to a pixmap: https://wiki.ugfx.io/index.php/Pixmaps

Posted

Hello,

There is Something Strange with your response. Why if i load a file as JPG or PNG (same image, same resolution) i get different performance if it's uncompressed in cache* ?

* i load images on startup.

 

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