Skip to content

Commit

Permalink
fix: heavy sketch file (#2992)
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk authored and github-actions[bot] committed May 10, 2024
1 parent 1a4a439 commit 041baa3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class DrawingCanvasViewModel : ViewModel() {
Bitmap.Config.ARGB_8888
)
val canvas = Canvas(bitmap).apply { drawPaint(Paint().apply { color = Color.White.toArgb() }) }
context.contentResolver.openFileDescriptor(tempSketchFile, "rw")?.use { fileDescriptor ->
context.contentResolver.openFileDescriptor(tempSketchFile, "rwt")?.use { fileDescriptor ->
FileOutputStream(fileDescriptor.fileDescriptor).use { fileOutputStream ->
paths.forEach { path -> path.drawNative(canvas) }
bitmap.compress(Bitmap.CompressFormat.JPEG, QUALITY, fileOutputStream)
Expand Down

0 comments on commit 041baa3

Please sign in to comment.