saveBitmapInternal実装

This commit is contained in:
r-ca 2024-01-09 12:38:48 +09:00
parent 76f4a6c228
commit 0736a7326a
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -185,6 +185,15 @@ public class FileManagerImpl implements FileManager {
throw new IOException("Failed to save xml");
}
}
private void saveBitmapInternal(Bitmap bitmap) throws IOException {
try {
File file = this.path.toFile();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(file.toPath()));
} catch (Exception e) {
logger.error("saveBitmapInternal", e.getMessage());
throw new IOException("Failed to save bitmap");
}
}
@Override
public void saveXml(Document document, String fileName) throws IOException {