Screenshot and thumbnails

I am wanting to take a screenshot and create a thumbnail of that image (either cropped or reduced size). I know that I can get a screenshot by using display.captureScreen(). Are there any functions/APIs that do image manipulation in code so that I can crop or resize the image into a thumbnail size and save that modified image to file? [import]uid: 92150 topic_id: 29442 reply_id: 329442[/import]

local img = display.captureScreen()  
img.width = img.width \* 0.5; img.height = img.height \* 0.5; -- Will crop the image by half  
img.xScale = 0.5; img.yScale = 0.5; -- Will resize the image to half  

You can use these two properties to adjust your display images by code :slight_smile: [import]uid: 14018 topic_id: 29442 reply_id: 118298[/import]

Yeah, I got that far. What I was wondering is if there was a way to then save that resulting cropped or resized image to file? [import]uid: 92150 topic_id: 29442 reply_id: 118341[/import]

display.save() [import]uid: 14018 topic_id: 29442 reply_id: 118452[/import]

Thanks! Got it working except for the ideal situation of cropping. Both the width and height settings as well as the xscale and yscale only resize the image. I would love for there to be a way to basically crop out the middle third of the image and save only that. Haven’t been able to figure it out yet though. Tried creating a mask and that sort of worked but wasn’t ideal. Thanks for the input and I’ll keep digging. [import]uid: 92150 topic_id: 29442 reply_id: 118474[/import]

Ah! Just found a new API in the 846 build notes. display.captureBounds(contentBounds, savetofile). This takes care of the saving and cropping. Yay! Works like a charm! [import]uid: 92150 topic_id: 29442 reply_id: 118537[/import]