From a47d65227583500a15fd6f289d7cb415f8918e2f Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 25 Dec 2023 11:57:48 +0900 Subject: [PATCH] =?UTF-8?q?png=E3=81=A7=E4=BF=9D=E5=AD=98=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/one/nem/lacerta/source/file/impl/FileManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java index 559c41de..5a8ffa64 100644 --- a/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java +++ b/source/src/main/java/one/nem/lacerta/source/file/impl/FileManagerImpl.java @@ -87,7 +87,8 @@ public class FileManagerImpl implements FileManager { @Override public void saveBitmapAtCurrent(Bitmap bitmap, String fileName) { // TODO-rca: ファイル形式を変更できるようにする? try { - Files.write(currentDir.resolve(fileName), bitmap.toString().getBytes()); // TODO-rca: エラーハンドリング + File file = currentDir.resolve(fileName).toFile(); + bitmap.compress(Bitmap.CompressFormat.PNG, 100, Files.newOutputStream(file.toPath())); } catch (IOException e) { e.printStackTrace(); }