drawing image with wxMax
BlitzMax Forums/Brucey's Modules/drawing image with wxMax
| ||
So far I managed to draw an image to on a window, but the image appears not in its original colors on the screen. How do I use the SetBlend command together with wxMax? Or is there a similar function to resolve the problem? - Peter |
| ||
Are you drawing a pixmap to a window or a TImage to a canvas on a window? You are using FreeImage and which platform? Thanks ;-) |
| ||
I'm drawing a wxBitmap (converted from a wxImage) on a wxPaintDC (created on a wxScrolledWindow) during an OnPaint event. I'm not using FreeImage (so far). Platform: Windows (XP, 7) I found an example somewhere (don't remember where at the moment) which describes the above method. -- Peter Last edited 2011 |
| ||
Seems my problem goes down unnoticed ... -- Peter |
| ||
Using the FreeImage library to load and convert the images to a wxImage solves the problem (if anyone is interested). -- Peter |
| ||
This is an example of loading and drawing a GIF image in wxMax, based on code from another post : |
| ||
Hi y'all, sorry to do some midnight digging , but sense I wandered here there might be a chance that someone else does too. So I believe that the problem is related to format (big/little endian) the pixmap is in meaning that if you see inverse colors you may need to convert from PF_BGRA8888 to PF_RGBA8888 (notice the red,green and blue element placement). TPixmap has Convert-method which can be used like this: pixmap:TPixmap = pixmap.Convert(PF_RGBA8888) -Henri |