Can you explain more on what it's supposed to be doing? The whole ChangeCanvasSize (which you've spelled incorrectly plus a few others as Khris has pointed out) and what not is a little confusing.
If you use the PrintImage function multiple times the height will ever increase to Raw image height plus the sprite "slot" height as well. So it would be gigantic if used numerous times. (Edit: I actually didn't notice your Crop call below which checks if it's higher than 1500)
There's also a couple other things I'm confused with. For instance why you have a global variable for Surface? I've actually done some benchmarking and found out that it isn't noticeable if you reassign the GetDrawingSurface numerous times or not within a game loop. So you're better off with just containing the DrawingSurface variable within this function as a local variable.
Edit: You've also got PrintImage instead of void PrintImage (or function). I'm assuming this was typed by memory and not copied?
If you use the PrintImage function multiple times the height will ever increase to Raw image height plus the sprite "slot" height as well. So it would be gigantic if used numerous times. (Edit: I actually didn't notice your Crop call below which checks if it's higher than 1500)
There's also a couple other things I'm confused with. For instance why you have a global variable for Surface? I've actually done some benchmarking and found out that it isn't noticeable if you reassign the GetDrawingSurface numerous times or not within a game loop. So you're better off with just containing the DrawingSurface variable within this function as a local variable.
Edit: You've also got PrintImage instead of void PrintImage (or function). I'm assuming this was typed by memory and not copied?