mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 01:33:16 +00:00
代替としてStoreで管理するように
This commit is contained in:
parent
ed5e699493
commit
0b2d58470b
|
@ -22,6 +22,7 @@ import dagger.assisted.AssistedInject;
|
|||
import one.nem.lacerta.source.file.FileManager;
|
||||
|
||||
import one.nem.lacerta.utils.LacertaLogger;
|
||||
import one.nem.lacerta.utils.Store;
|
||||
|
||||
public class FileManagerImpl implements FileManager {
|
||||
|
||||
|
@ -303,7 +304,7 @@ public class FileManagerImpl implements FileManager {
|
|||
private void saveBitmapInternal(Bitmap bitmap, Path path) throws IOException {
|
||||
try {
|
||||
logger.debug("saveBitmapInternal", "path: " + path);
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(path));
|
||||
bitmap.compress(Bitmap.CompressFormat.PNG, Store.Scan.PNG_QUALITY, Files.newOutputStream(path));
|
||||
} catch (Exception e) {
|
||||
logger.error("saveBitmapInternal", e.getMessage());
|
||||
throw new IOException("Failed to save bitmap");
|
||||
|
|
7
utils/src/main/java/one/nem/lacerta/utils/Store.java
Normal file
7
utils/src/main/java/one/nem/lacerta/utils/Store.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package one.nem.lacerta.utils;
|
||||
|
||||
public class Store {
|
||||
public class Scan {
|
||||
public static final int PNG_QUALITY = 60;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user