Bitmap.getPngEncodedData improvements, PR #71

This commit is contained in:
Emux
2016-07-18 10:54:23 +03:00
parent 44b40608f6
commit a5679ce214
7 changed files with 61 additions and 26 deletions

View File

@@ -189,14 +189,6 @@ public class IosBitmap implements Bitmap {
return this.cgBitmapContext != null;
}
@Override
public byte[] getPngEncodedData() {
UIImage uiImage = new UIImage(cgBitmapContext.toImage());
NSData data = uiImage.toPNGData();
return data.getBytes();
}
/**
* Returns a ByteArray from InputStream
*
@@ -228,4 +220,11 @@ public class IosBitmap implements Bitmap {
Color.r(color))
.getCGColor();
}
@Override
public byte[] getPngEncodedData() {
UIImage uiImage = new UIImage(cgBitmapContext.toImage());
NSData data = uiImage.toPNGData();
return data.getBytes();
}
}