[TIMOB-2041] takeScreenshot supporting retina disaplay (with an imageAsCropped bonus!)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2017-06-05T20:22:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | blob, cropped, image, ios, iphone, retina, screenshot |
Reporter | kosso |
Assignee | Ingo Muschenetz |
Created | 2011-04-15T03:08:51.000+0000 |
Updated | 2017-06-05T20:22:35.000+0000 |
Description
Hi,
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:
http://developer.appcelerator.com/helpdesk/view/48581">http://developer.appcelerator.com/helpdesk/view/48581
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.
Cheers,
Kosso
Would you be so kind to post the code somewhere public?
Thanks in advance!
Sure. Here you go: http://gist.github.com/621367">http://gist.github.com/621367