From 46b0b124f4d33660ccdfd6692eb2f6f848398d60 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sun, 1 Sep 2024 03:25:26 +0300 Subject: [PATCH] I forgot to include Export.gd in the previous commit Oops --- src/Autoload/Export.gd | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Autoload/Export.gd b/src/Autoload/Export.gd index 4521ac5c9..89ec8c49e 100644 --- a/src/Autoload/Export.gd +++ b/src/Autoload/Export.gd @@ -60,6 +60,7 @@ var export_layers := 0 var number_of_frames := 1 var direction := AnimationDirection.FORWARD var resize := 100 +var save_quality := 0.75 ## Used when saving jpg and webp images. Goes from 0 to 1. var interpolation := Image.INTERPOLATE_NEAREST var include_tag_in_filename := false var new_dir_for_each_frame_tag := false ## We don't need to store this after export @@ -441,7 +442,7 @@ func export_processed_images( ) elif project.file_format == FileFormat.JPEG: JavaScriptBridge.download_buffer( - processed_images[i].image.save_jpg_to_buffer(), + processed_images[i].image.save_jpg_to_buffer(save_quality), export_paths[i].get_file(), "image/jpeg" ) @@ -453,7 +454,7 @@ func export_processed_images( elif project.file_format == FileFormat.WEBP: err = processed_images[i].image.save_webp(export_paths[i]) elif project.file_format == FileFormat.JPEG: - err = processed_images[i].image.save_jpg(export_paths[i]) + err = processed_images[i].image.save_jpg(export_paths[i], save_quality) if err != OK: Global.popup_error( tr("File failed to save. Error code %s (%s)") % [err, error_string(err)]