Copy a region out of a Pixmap

BlitzMax Forums/BlitzMax Beginners Area/Copy a region out of a Pixmap

Drawimage rect which can be saved as pixmap

You'd need to check the size being copied is smaller than the actual image w/h...
Function tg_copyimagerect:TImage(image:TImage,x1:Int,y1:Int,x2:Int,y2:Int)
    Return LoadImage(PixmapWindow(LockImage(image),x1,y1,x2,y2))
End Function