Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2041] takeScreenshot supporting retina disaplay (with an imageAsCropped bonus!)

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-05T20:22:35.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsblob, cropped, image, ios, iphone, retina, screenshot
Reporterkosso
AssigneeIngo Muschenetz
Created2011-04-15T03:08:51.000+0000
Updated2017-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

Comments

  1. PanMan 2011-04-15

    Would you be so kind to post the code somewhere public?
    Thanks in advance!

  2. kosso 2011-04-15

    Sure. Here you go: http://gist.github.com/621367">http://gist.github.com/621367

JSON Source