Locking + unlocking an image doesnt work

BlitzMax Forums/BlitzMax Programming/Locking + unlocking an image doesnt work

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

i've seen this before...

when you create an image it doesn't always create an assosiated pixmap straight away. So when you try to lock it, there is no pixmap to lock.

When drawing the image it will always create a pixmap before drawing. So add a "drawimage image,-maxx,-maxy" just after you create it.

Global image:timage=CreateImage(maxx,maxy,1,filteredimage+dynamicimage)
drawimage image,-maxx,-maxy  ' draw offscreen
Local pixmap:TPixmap = LockImage(image)

This should fix it.