'' We have to include this to use our FB.IMAGE datatype, remember. #include "fbgfx.bi" '' Our image width/height Const ImgW = 64 Const ImgH = 64 '' Screens have to be created before a call to imagecreate Screenres 640, 480, 32 '' Create our buffer Dim as FB.Image ptr myBuf = ImageCreate(ImgW, ImgH) '' This one is very important. '' We cast to a ubyte ptr first off, to get the exact byte our pixels begin. '' We then cast to a uInteger ptr, simply to avoid "suspicious assignment" '' warnings. Dim as uInteger ptr myPix = cast( uInteger ptr, ( cast( ubyte ptr, myBuf ) + sizeof(FB.Image) ) ) '' Print the address of our buffer. Print "Buffer created at: " & myBuf Print "" '' Print information stored in our buffer. Print "Image Width: " & myBuf->Width Print "Image Height: " & myBuf->Height Print "Image Bit Depth: " & myBuf->BPP Print "Image Pitch: " & myBuf->Pitch Print "" Print "Image Pixels At Address: " & myPix Print "" sleep '' Destroy our buffer. Always DESTROY buffers you CREATE ImageDestroy( myBuf ) Print "Our buffer was destroyed." sleep