Skip to content

Commit 9d62729

Browse files
guhungryTrancever
authored andcommitted
fix(android): Wrong sample size exit logic (#19)
Reference: https://developer.android.com/topic/performance/graphics/load-bitmap
1 parent 2c2211a commit 9d62729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/reactnativecommunity/imageeditor/ImageEditorModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ else if (internalCacheDir == null) {
510510
*/
511511
private static int getDecodeSampleSize(int width, int height, int targetWidth, int targetHeight) {
512512
int inSampleSize = 1;
513-
if (height > targetWidth || width > targetHeight) {
513+
if (height > targetHeight || width > targetWidth) {
514514
int halfHeight = height / 2;
515515
int halfWidth = width / 2;
516516
while ((halfWidth / inSampleSize) >= targetWidth

0 commit comments

Comments
 (0)