appcelerator/titanium_mobile — pull request #1589 by mstepanov (2012-03-07 19:12:14+00:00)
Title: [TIMOB-7586] save image blob in a format corresponding to its mime type and set default mime type for TiView.toImage() to image/png

[TIMOB-7586](https://jira.appcelerator.org/browse/TIMOB-7586)
[TIMOB-4594](https://jira.appcelerator.org/browse/TIMOB-4594)

Saving in PNG by default also resolves a parity issue with Android where view.toImage() always returns PNG.

Test instructions:
Use code from [TIMOB-7586](https://jira.appcelerator.org/browse/TIMOB-7586), run it, then verify file contents at ~/Library/Application\ Support/iPhone\ Simulator/4.3.2/Applications/XXXXXX/Documents/tst.png' with Preview.app (toggle menu View/Show Image Background)