Skip to content
This repository has been archived by the owner on Sep 8, 2019. It is now read-only.

Commit

Permalink
- v1.2.1 Beta release
Browse files Browse the repository at this point in the history
- fixed crash, when trying to print to big images
  • Loading branch information
kollerlukas committed Mar 1, 2017
1 parent 2fc598c commit 2ddd803
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "us.koller.cameraroll"
minSdkVersion 19
targetSdkVersion 25
versionCode 12
versionName "v1.2 Beta"
versionCode 13
versionName "v1.2.1 Beta"
renderscriptTargetApi 25
renderscriptSupportModeEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand Down
10 changes: 8 additions & 2 deletions app/src/main/java/us/koller/cameraroll/ui/ItemActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -431,8 +432,13 @@ public void printPhoto() {

PrintHelper photoPrinter = new PrintHelper(this);
photoPrinter.setScaleMode(PrintHelper.SCALE_MODE_FIT);
Bitmap bitmap = BitmapFactory.decodeFile(albumItem.getPath());
photoPrinter.printBitmap(albumItem.getPath(), bitmap);
try {
photoPrinter.printBitmap(albumItem.getPath(),
albumItem.getUri(this));
} catch (FileNotFoundException e) {
Toast.makeText(this, "Error", Toast.LENGTH_SHORT).show();
e.printStackTrace();
}
}

public void editPhoto() {
Expand Down

0 comments on commit 2ddd803

Please sign in to comment.