youresam
Joined: 06 Nov 2005 Posts: 87
|
Posted: Thu Mar 16, 2006 1:46 am Post subject: |
|
|
Hmm....
Here, its a bit tricky.
-Make a new, blank image the size you want to save
-Then, blit the image that you want at negative coordinates...
Example:
Image is 480x272, you want 50x50 starting at 10x10:
(largeimage is the source image)
someimage = Image.createEmpty(50,50)
someimage:blit(-10, -10, largeimage)
someimage:save("image.png")
So there it is. Took me a while to make sure its -10,-10 instead of -9,-9 or -11,-11 because pixels start at 0. |
|