err.... no setbuffer for pixmap?

BlitzMax Forums/BlitzMax Programming/err.... no setbuffer for pixmap?

[After discussion on IRC] Try this:
Graphics 640,480,0

Local png:TPixmap = LoadPixmap("Graphics/bmax160_2.png")
If Not(png)
	DebugLog "BUGGER"
	End
EndIf 

Local png2:Tpixmap = CreatePixmap(512,512,PixmapFormat(png))	'important to do that last bit

Beaks_CopyPixMap(png, png2, 50,50)

DrawPixmap png2,0,0

Flip
WaitKey
End

Function Beaks_CopyPixMap(frompix:Tpixmap, topix:Tpixmap, x2,y2) 
	For Local y=0 Until PixmapHeight(frompix)
		CopyPixels frompix.PixelPtr(0,y),topix.PixelPtr(x2,y+y2),PixmapFormat(frompix),PixmapWidth(frompix)
	Next
End Function