[TIMOB-2041] takeScreenshot supporting retina disaplay (with an imageAsCropped bonus!)
|Labels||blob, cropped, image, ios, iphone, retina, screenshot|
I had asked a question on the helpdesk regarding the screenshot function (and also the toImage function) since I found that it didn't save images wider than 320 pixels. And since the iPhone4 is 640 x 960 I wanted a larger screenshot.
So, after some digging, searching and staring at code, I managed to update the MediaModule.m file to get it working as I needed it to.
I had also been asking for a function to crop an image(blob). (So I could kind of replicate the toImage method on my new larger image) Again, more staring at code (and a beer) and I've even managed to make a useful function to do it!
Not bad, for a non-ObjectiveC programmer, if I do say so myself! :))
Here it is:
Hope this helps.
I'm already finding it very useful. ;)
So, this isn't really a support ticket, but I think it would be cool to see it do in to Titanium in the future.
- PanMan 2011-04-15
Would you be so kind to post the code somewhere public?
Thanks in advance!
- kosso 2011-04-15