JPGCompressor for Titanium

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.

Enjoy.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.