Loading src/com/android/gallery3d/filtershow/tools/SaveImage.java +4 −0 Original line number Diff line number Diff line Loading @@ -402,6 +402,10 @@ public class SaveImage { // if we have a valid size int w = (int) (bitmap.getWidth() * sizeFactor); int h = (int) (bitmap.getHeight() * sizeFactor); if (w == 0 || h == 0) { w = 1; h = 1; } bitmap = Bitmap.createScaledBitmap(bitmap, w, h, true); } updateProgress(); Loading src/com/android/gallery3d/filtershow/ui/ExportDialog.java +10 −2 Original line number Diff line number Diff line Loading @@ -202,8 +202,8 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener return; } mEditing = true; int width = 0; int height = 0; int width = 1; int height = 1; if (text.getId() == R.id.editableWidth) { if (mWidthText.getText() != null) { String value = String.valueOf(mWidthText.getText()); Loading @@ -213,6 +213,10 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener width = mOriginalBounds.width(); mWidthText.setText("" + width); } if (width <= 0) { width = (int) Math.ceil(mRatio); mWidthText.setText("" + width); } height = (int) (width / mRatio); } mHeightText.setText("" + height); Loading @@ -226,6 +230,10 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener height = mOriginalBounds.height(); mHeightText.setText("" + height); } if (height <= 0) { height = 1; mHeightText.setText("" + height); } width = (int) (height * mRatio); } mWidthText.setText("" + width); Loading Loading
src/com/android/gallery3d/filtershow/tools/SaveImage.java +4 −0 Original line number Diff line number Diff line Loading @@ -402,6 +402,10 @@ public class SaveImage { // if we have a valid size int w = (int) (bitmap.getWidth() * sizeFactor); int h = (int) (bitmap.getHeight() * sizeFactor); if (w == 0 || h == 0) { w = 1; h = 1; } bitmap = Bitmap.createScaledBitmap(bitmap, w, h, true); } updateProgress(); Loading
src/com/android/gallery3d/filtershow/ui/ExportDialog.java +10 −2 Original line number Diff line number Diff line Loading @@ -202,8 +202,8 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener return; } mEditing = true; int width = 0; int height = 0; int width = 1; int height = 1; if (text.getId() == R.id.editableWidth) { if (mWidthText.getText() != null) { String value = String.valueOf(mWidthText.getText()); Loading @@ -213,6 +213,10 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener width = mOriginalBounds.width(); mWidthText.setText("" + width); } if (width <= 0) { width = (int) Math.ceil(mRatio); mWidthText.setText("" + width); } height = (int) (width / mRatio); } mHeightText.setText("" + height); Loading @@ -226,6 +230,10 @@ public class ExportDialog extends DialogFragment implements View.OnClickListener height = mOriginalBounds.height(); mHeightText.setText("" + height); } if (height <= 0) { height = 1; mHeightText.setText("" + height); } width = (int) (height * mRatio); } mWidthText.setText("" + width); Loading