Re: Loading a bitmap that was previously saved

new topic     » goto parent     » topic index » view thread      » older message » newer message
SPringle said...

I was attepting to cache images by saving image at exit and reloading at startup. I use the following to create the image.

error_code = copyToTrueColorBitmapFile( CleanFace, sprintf(clean_face_mask(),inner_size), 0, 0, inner_size[1]-1, inner_size[2]-1 ) 

CleanFace is a Pixmap. The picture saves with a good error code and I can open it with an external viewer but when I tried to load back the saved file to a Pixmap loadBitmapFromFile() the copyBlt() has no effect.

I am able to load colored bitmaps produced with gimp without any problems. The program doesn't issue me a warning or an error code. Is there something I need to do to the Pixmap before passing it to copyToTrueColorBitmapFile?

Shawn Pringle

Some time ago I used loadBitmapFromFile, using drawBitmap rather than copyBlt or bitBlt. That should not make much difference.
However, I remember reading somewhere that problems may arise if the dimensions are not exact multiples of 4. This may have been with some other image functions, but it is worth checking.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu