Skip to content

Commit da5335a

Browse files
xiesubinxiesubin
xiesubin
authored and
xiesubin
committed
fix
1 parent 34f47f2 commit da5335a

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Compressor is a lightweight and powerful android image compression library. Comp
77
# Gradle
88
```groovy
99
dependencies {
10-
implementation 'id.zelory:compressor:2.1.1'
10+
implementation 'id.zelory:compressor:2.1.2'
1111
}
1212
```
1313
# Let's compress the image size!

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies {
2323
compile fileTree(include: ['*.jar'], dir: 'libs')
2424
testCompile 'junit:junit:4.12'
2525
compile 'com.android.support:appcompat-v7:25.3.1'
26-
compile 'id.zelory:compressor:2.1.1'
26+
compile 'id.zelory:compressor:2.1.2'
2727
//compile project(':compressor')
2828
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
2929
}

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ buildscript {
1515
allprojects {
1616
repositories {
1717
jcenter()
18+
maven { url "https://jitpack.io" }
1819
}
1920
}
2021

compressor/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ext {
2626
siteUrl = 'https://github.com/zetbaitsu/Compressor'
2727
gitUrl = 'https://github.com/zetbaitsu/Compressor.git'
2828

29-
libraryVersion = '2.1.1'
29+
libraryVersion = '2.1.2'
3030

3131
developerId = 'zetbaitsu'
3232
developerName = 'Zetra'
@@ -45,7 +45,7 @@ android {
4545
minSdkVersion 9
4646
targetSdkVersion 25
4747
versionCode 5
48-
versionName "2.1.1"
48+
versionName "2.1.2"
4949
}
5050
buildTypes {
5151
release {

compressor/src/main/java/id/zelory/compressor/ImageUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private static int calculateInSampleSize(BitmapFactory.Options options, int reqW
7777
final int width = options.outWidth;
7878
int inSampleSize = 1;
7979

80-
if (height > reqHeight || width > reqWidth) {
80+
if (height > reqHeight && width > reqWidth) {
8181
inSampleSize *= 2;
8282
final int halfHeight = height / 2;
8383
final int halfWidth = width / 2;

0 commit comments

Comments
 (0)