Skip to content

Commit

Permalink
remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
parveshneedhoo committed Mar 22, 2024
1 parent de318c1 commit de3ceb1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/android/SpectrumManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ private void transcodeImage(String path, int size, CallbackContext callbackConte
bitmap = Bitmap.createScaledBitmap(bitmap, targetSize.width, targetSize.height, true);
}

// Define the output file with a new filename and .webp extension
String destinationFileName = UUID.randomUUID().toString() + "_compressed.jpg";
String destinationPath = sourcePath.replace(file.getName(), destinationFileName);
File outputFile = new File(destinationPath);

// Compress and save the bitmap in WEBP lossless format
try (FileOutputStream out = new FileOutputStream(outputFile)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (!bitmap.compress(Bitmap.CompressFormat.JPEG, 80, out)) {
Expand Down

0 comments on commit de3ceb1

Please sign in to comment.