Mercurial > cgi-bin > hgweb.cgi > SimpleResizer
comparison app/src/main/java/com/bartsent/simpleresizer/EditImage.kt @ 46:8205f3c17500 default tip
Tweak messages a little.
author | David Barts <n5jrn@me.com> |
---|---|
date | Wed, 14 Apr 2021 08:18:23 -0700 |
parents | 44848342c321 |
children |
comparison
equal
deleted
inserted
replaced
45:44848342c321 | 46:8205f3c17500 |
---|---|
444 throw IOException(getString(R.string.error_get_output)) | 444 throw IOException(getString(R.string.error_get_output)) |
445 } | 445 } |
446 val quality = maxOf(0, minOf(100, | 446 val quality = maxOf(0, minOf(100, |
447 PreferenceManager.getDefaultSharedPreferences(applicationContext).getInt( | 447 PreferenceManager.getDefaultSharedPreferences(applicationContext).getInt( |
448 "jpeg_quality", 85))) | 448 "jpeg_quality", 85))) |
449 Log.d("EditImage", "saving, jpeg_quality = $quality") | 449 // Log.d("EditImage", "saving, jpeg_quality = $quality") |
450 stream.use { | 450 stream.use { |
451 if (!image.compress(Bitmap.CompressFormat.JPEG, quality, it)) { | 451 if (!image.compress(Bitmap.CompressFormat.JPEG, quality, it)) { |
452 throw IOException(getString(R.string.error_save_bitmap)) | 452 throw IOException(getString(R.string.error_save_bitmap)) |
453 } | 453 } |
454 } | 454 } |