fix imagemagick resize

This commit is contained in:
Brandon Thomas committed 2021-05-25 02:46:14 -04:00
1 parent 43736d01e2
commit 1da4ab5588
2 files changed
+5 -2

No files matched your search

+2
View File
@@ -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',
@@ -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 ");