There's no bug forum for Blitz 2D anymore, so I thought I would post this here to see if anyone can tell me I am doing something wrong, or that this is indeed a bug. It's about the CopyPixelFast command. I keep getting a "Memory Access Violation" when trying to copy a pixel from an ImageBuffer to the FrontBuffer (or BackBuffer, it doesn't seem to matter, the critical part seems to be the ImageBuffer part). The Help file says this should be "used on a locked buffer" but this is somewhat cryptic as the command works on two buffers. Also, the first buffer in their example is an "ImageBuffer'ed" buffer as well. These can't be locked as far as I know. My own code I have reduced to the following lines. (The image used should of course be at least of size 11*11 as I am reading from position 10,10.) Does anyone have an idea?
Graphics 640,480,16 pic = LoadImage("Graphics/wall_2.png") LockBuffer CopyPixelFast 10,10,ImageBuffer(pic),10,10 UnlockBuffer WaitKey EndNote that normally I would use brackets and stuff but I changed this to look like the online example (in the end you try everything...). Edit: it's not a case of the image not being loaded, I tested this by adding a DrawImage and WaitKey right after the LoadImage command. It's also not a problem with a wrong video mode (as far as I can tell), I tried removing the 16 in the Graphics command and it doesn't help. Also tried different resolutions.