Skip to content

Commit

Permalink
fix bug happens on reqWidth is between 1/2 * width and width
Browse files Browse the repository at this point in the history
  • Loading branch information
xiesubin authored and xiesubin committed Dec 21, 2018
1 parent 31d924e commit 65f7063
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Compressor is a lightweight and powerful android image compression library. Comp
# Gradle
```groovy
dependencies {
implementation 'id.zelory:compressor:2.1.0'
implementation 'id.zelory:compressor:2.1.1'
}
```
# Let's compress the image size!
Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'id.zelory:compressor:2.1.0'
compile 'id.zelory:compressor:2.1.1'
//compile project(':compressor')
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
}
4 changes: 2 additions & 2 deletions compressor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ext {
siteUrl = 'https://github.com/zetbaitsu/Compressor'
gitUrl = 'https://github.com/zetbaitsu/Compressor.git'

libraryVersion = '2.1.0'
libraryVersion = '2.1.1'

developerId = 'zetbaitsu'
developerName = 'Zetra'
Expand All @@ -45,7 +45,7 @@ android {
minSdkVersion 9
targetSdkVersion 25
versionCode 5
versionName "2.1.0"
versionName "2.1.1"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private static int calculateInSampleSize(BitmapFactory.Options options, int reqW
int inSampleSize = 1;

if (height > reqHeight || width > reqWidth) {

inSampleSize *= 2;
final int halfHeight = height / 2;
final int halfWidth = width / 2;

Expand Down

0 comments on commit 65f7063

Please sign in to comment.