Umm .. not sure. Maybe remove the FlushMem, I don't see any reason why you would want to do that.
Also, to flip an image, you can use SetScale with negative values such as SetScale -1,1 should flip an image horizontally. You can just convert the pixmap to an image and use the scaling-flip and then DrawImage.
But I know you're not exactly just trying to do that. I don't see why you would be getting a crash ... and the reason it is slow is because you are accessing a lot of individual pixels, plus you are working in main memory - might depent on the speed of you computer. You also put a delay in there, of course it will pause.
|