Allow users to save text stories.

This commit is contained in:
Alex Hart
2022-10-13 10:21:00 -03:00
parent 43caec69e3
commit 7cdaf988f2
3 changed files with 31 additions and 2 deletions

View File

@@ -272,7 +272,7 @@ public class BitmapUtil {
return new Pair<>(options.outWidth, options.outHeight);
}
public static InputStream toCompressedJpeg(Bitmap bitmap) {
public static ByteArrayInputStream toCompressedJpeg(Bitmap bitmap) {
ByteArrayOutputStream thumbnailBytes = new ByteArrayOutputStream();
bitmap.compress(CompressFormat.JPEG, 85, thumbnailBytes);
return new ByteArrayInputStream(thumbnailBytes.toByteArray());