Removed RX java

This commit is contained in:
h4h13 2019-12-27 01:23:11 +05:30
parent 62726de918
commit 09c056f5ca
4 changed files with 26 additions and 60 deletions

View file

@ -20,8 +20,6 @@ import android.graphics.Bitmap;
import java.io.File;
import java.io.IOException;
import io.reactivex.Flowable;
/**
* Created on : June 18, 2016
* Author : zetbaitsu
@ -77,28 +75,4 @@ public class Compressor {
public Bitmap compressToBitmap(File imageFile) throws IOException {
return ImageUtil.decodeSampledBitmapFromFile(imageFile, maxWidth, maxHeight);
}
public Flowable<File> compressToFileAsFlowable(final File imageFile) {
return compressToFileAsFlowable(imageFile, imageFile.getName());
}
public Flowable<File> compressToFileAsFlowable(final File imageFile, final String compressedFileName) {
return Flowable.defer(() -> {
try {
return Flowable.just(compressToFile(imageFile, compressedFileName));
} catch (IOException e) {
return Flowable.error(e);
}
});
}
public Flowable<Bitmap> compressToBitmapAsFlowable(final File imageFile) {
return Flowable.defer(() -> {
try {
return Flowable.just(compressToBitmap(imageFile));
} catch (IOException e) {
return Flowable.error(e);
}
});
}
}