WinBlitz3D - Images?

Blitz3D Forums/Blitz3D Programming/WinBlitz3D - Images?

EPS(Posted 2007) [#1]
Hi, a few short questions to WinBlitz3D...

1. Is there any way to insert a editable image (i.E. CreateImage) into a window in WinBlitz3D? The only way to get a image into a window that i found was a panel but this images are loaded as BMP files.

2. If not, is there any other way to manipulate the loaded image in the panel?

many thanks and sorry for my bad english...EPS


Danny(Posted 2007) [#2]
Hi,

You can convert a blitz image into an Icon using WB3D_BBImageToIcon() function - see wb3dStyles.bb.
That function returns the handle to the icon which you can then paste or 'draw' onto gadgets (window, panel, ..) using WB3D_DrawIcon().
And don't forget to 'free' the icon when you don't need it anymore using WB3D_FreeIcon()

But 'converting' an image to an icon is not super fast, ie. you should not use it for real-time options.
Ofcourse, the bigger the image, the longer it takes to convert..
But if you're working on an editor, then it might be totally acceptable.
I use it myself to create thumbnails for a model library for example..

There is no way to manipulate an existing icon - as far as I know.
But using the functions I mentioned above, you can alter a blitz image, reconvert it again and paste it back onto the gadget.

Hope that helps.
Danny


EPS(Posted 2007) [#3]
thanks a lot - it works :-)