pngで保存するように変更

This commit is contained in:
r-ca 2023-12-25 11:57:48 +09:00
parent e55b5709dd
commit a47d652275
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -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();
}