Skip to content

Commit

Permalink
use 80% compression by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pnico committed Apr 9, 2014
1 parent 83e6bf1 commit 026aaae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public SavedBitmap(Bitmap bitmap, String path) {
static public byte[] getJPEGRepresentationFromBitmap(Bitmap bitmap)
{
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);
bitmap.compress(Bitmap.CompressFormat.JPEG, 80, outputStream);
return outputStream.toByteArray();
}

Expand Down
Binary file modified bin/AirImagePicker.ane
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/AirImagePicker/AirImagePicker.m
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ - (NSURL *) saveImageToTemporaryDirectory:(UIImage *)image {
NSLog(@"Entering - saveImageToTemporaryDirectory");

// JPEG compression
NSData *imageJPEGData = UIImageJPEGRepresentation(image, 0.95);
NSData *imageJPEGData = UIImageJPEGRepresentation(image, 0.8);

NSURL *tempDir = [AirImagePicker getTemporaryDirectory];
NSError *error = nil;
Expand Down

1 comment on commit 026aaae

@hessel
Copy link

@hessel hessel commented on 026aaae May 15, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thia ane works in android ?

Please sign in to comment.