The iPhone App I, as part of a team, was working on during the last couple months for a client reached the Appstore some days ago. You can find everything about Grouptime on the Webpage. By the way the App is build using Titanium, and is the reason for me to be developing the jpgcompressor Titanium module.
And now back to work on the Android Port, go go go!
Since I wrote the initial version of jpgcompressor for titanium, I needed scaling of images as well. The only way to do this in titanium is to overlay an Ti.UI.imageView and grab the picture out. This is neither fast nor clean, and it seems to reduce the quality for some weird reason. Since I figured I’m not the only one facing this problem, I added the feature to jpgcompressor via the scale function. Documentation is available in the example. If there are any problems please let me know, the code is build against the new 1.7.2 version of Titanium but should work with previous versions as well by adjusting the manifest as well as titanium.xconfig.
There is still room for optimization ;)
Since Titanium is not exporting the UIImageJPEGRepresentation function present in the iPhone SDK, there finally was a reason for me to write a little Titanium Module to do that myself. It is quite easy just define the desired size and pass the picture as a TiBlob, it is compressed as close as possible to the desired size and returned. Example usage is present in the app.js used for testing in the Project.