diff --git a/debug/curl/upload_w2l_image_gdrive.py b/debug/curl/upload_w2l_image_gdrive.py index aadb14da89..250afcd4b1 100755 --- a/debug/curl/upload_w2l_image_gdrive.py +++ b/debug/curl/upload_w2l_image_gdrive.py @@ -37,6 +37,8 @@ cookies = { 'session': session_cookie } # elon_integration_test.jpg download_url = 'https://drive.google.com/file/d/1yoBSb6nwFUZVI4CD-nM2BSofGdBjC8Nn/view?usp=sharing' +#download_url = 'https://i.imgur.com/...' + payload = { 'idempotency_token': str(uuid.uuid4()), 'title': 'this is a new image template', diff --git a/src/script_execution/imagemagick_generate_preview_image_command.rs b/src/script_execution/imagemagick_generate_preview_image_command.rs index 878bf75d80..cb6a4b7eb8 100644 --- a/src/script_execution/imagemagick_generate_preview_image_command.rs +++ b/src/script_execution/imagemagick_generate_preview_image_command.rs @@ -24,7 +24,8 @@ impl ImagemagickGeneratePreviewImageCommand { { let mut command = String::new(); - let dimensions = format!("{}x{}", output_width, output_height); + // NB: `\!` ignores aspect ratio preservation + let dimensions = format!("{}x{}\\!", output_width, output_height); // magick wizard.png -quality 50 -define webp:lossless=true wizard.webp command.push_str("echo 'test'"); @@ -32,7 +33,7 @@ impl ImagemagickGeneratePreviewImageCommand { //command.push_str("magick"); command.push_str("convert "); command.push_str(&input_image_filename); - command.push_str(" -size "); + command.push_str(" -resize "); command.push_str(&dimensions); command.push_str(" -quality 50 "); command.push_str(" -define webp:loseless=false ");