mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-19 16:45:20 +01:00
Removed RX java
This commit is contained in:
parent
62726de918
commit
09c056f5ca
4 changed files with 26 additions and 60 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue