Skip to content

Commit

Permalink
update.
Browse files Browse the repository at this point in the history
  • Loading branch information
devxiny committed May 12, 2021
1 parent 8523bac commit 1231a5c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 1 addition & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Fri Oct 26 14:42:54 CST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
14 changes: 8 additions & 6 deletions tiny/src/main/java/com/zxy/tiny/core/FileCompressor.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,16 @@ public static CompressResult compress(Bitmap bitmap, Tiny.FileCompressOptions op
if (quality < 0 || quality > 100)
quality = CompressKit.DEFAULT_QUALITY;

if (Conditions.isDirectory(outfile))
outfile = FileKit.generateCompressOutfileFormatJPEG(compressDirectory).getAbsolutePath();
if (TextUtils.isEmpty(outfile)) {
if (Conditions.isDirectory(outfile))
outfile = FileKit.generateCompressOutfileFormatJPEG(compressDirectory).getAbsolutePath();

if (!Conditions.isJpegFormat(outfile))
outfile = FileKit.generateCompressOutfileFormatJPEG(compressDirectory).getAbsolutePath();
if (!Conditions.isJpegFormat(outfile))
outfile = FileKit.generateCompressOutfileFormatJPEG(compressDirectory).getAbsolutePath();

if (bitmap.hasAlpha())
outfile = FileKit.generateCompressOutfileFormatPNG(compressDirectory).getAbsolutePath();
if (bitmap.hasAlpha())
outfile = FileKit.generateCompressOutfileFormatPNG(compressDirectory).getAbsolutePath();
}

boolean isSuccess = false;
try {
Expand Down

0 comments on commit 1231a5c

Please sign in to comment.