Skip to content

Commit

Permalink
Fixed output quality of tests + Some temp checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pverscha committed Jun 4, 2017
1 parent b9d5429 commit 6ed83bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void saveImageToExternalStorage(Bitmap finalBitmap) {
file.delete();
try {
FileOutputStream out = new FileOutputStream(file);
finalBitmap.compress(Bitmap.CompressFormat.JPEG, 90, out);
finalBitmap.compress(Bitmap.CompressFormat.JPEG, 98, out);
out.flush();
out.close();
}
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/java/be/abyx/aurora/BlurryAurora.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ public BlurryAurora(Context context) {

@Override
public Bitmap render(int width, int height, int colour) {
if (width > 1200) {
throw new RuntimeException("Only widths up to 1200 pixels are supported at the moment!");
}

if (height > 1920) {
throw new RuntimeException("Only heights up to 1920 pixels are supported at the moment!");
}

// Force disable the automatic density scaling
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inScaled = false;
Expand Down

0 comments on commit 6ed83bd

Please sign in to comment.