Skip to content

fix: change convert.exe syntax to avoid clash in Windows - #3416

Merged
ice0 merged 1 commit into
synfig:masterfrom
rodolforg:fix-imagemagick-convert-windows
Sep 14, 2024
Merged

ice0 merged 1 commit into
synfig:masterfrom
rodolforg:fix-imagemagick-convert-windows

Conversation

@rodolforg

Copy link
Copy Markdown
Contributor

On Windows (I built with CMake) for some weird reason calling ImageMagick's convert calls Windows/System32/convert.exe . It's odd because my Path env var seems to list the mingw64 directory first, but a solution is using the 'magick' syntax, where you just call 'magick' to convert as per https://imagemagick.org/script/command-line-tools.php

The problem is widely known as per https://stackoverflow.com/questions/3060205/error-invalid-parameter-fom-imagemagick-convert-on-windows , I was getting the same 'Invalid Parameter' error

The patch uses 'magick convert' (legacy syntax), instead of 'magick' for compatibility with ImageMagick 6, since many distros don't have official packages for ImageMagick 7, despite the release being over 5 years old:

https://packages.debian.org/search?searchon=sourcenames&keywords=imagemagick
https://packages.fedoraproject.org/pkgs/ImageMagick/ImageMagick/
https://packages.ubuntu.com/search?keywords=imagemagick

The reason is that v7's syntax is not fully compatible with v6 but it our syntax seems safe

TL;DR:
Instead of using ImageMagick with 'convert' use 'magick convert' since Win has another 'convert' program

Supersedes: #2951

On Windows (I built with CMake) for some weird reason calling ImageMagick's convert calls Windows/System32/convert.exe . It's odd because my Path env var seems to list the mingw64 directory first, but a solution is using the 'magick' syntax, where you just call 'magick' to convert as per https://imagemagick.org/script/command-line-tools.php

The problem is widely known as per https://stackoverflow.com/questions/3060205/error-invalid-parameter-fom-imagemagick-convert-on-windows , I was getting the same 'Invalid Parameter' error

The patch uses 'magick convert' (legacy syntax), instead of 'magick' for compatibility with ImageMagick 6, since many distros don't have official packages for ImageMagick 7, despite the release being over 5 years old:

    https://packages.debian.org/search?searchon=sourcenames&keywords=imagemagick
    https://packages.fedoraproject.org/pkgs/ImageMagick/ImageMagick/
    https://packages.ubuntu.com/search?keywords=imagemagick

The reason is that v7's syntax is not fully compatible with v6 but it our syntax seems safe

TL;DR:
Instead of using ImageMagick with 'convert' use 'magick convert' since Win has another 'convert' program

Supersedes: synfig#2951

Co-authored-by: Eduardo Hernández <[email protected]>
@rodolforg
rodolforg force-pushed the fix-imagemagick-convert-windows branch from 2b94efd to 20c6a83 Compare September 6, 2024 08:27
@ice0
ice0 merged commit 4160e5d into synfig:master Sep 14, 2024
@ice0

ice0 commented Sep 14, 2024

Copy link
Copy Markdown
Collaborator

Merged. Thank you!

@ice0 ice0 added the Windows label Sep 14, 2024
@rodolforg
rodolforg deleted the fix-imagemagick-convert-windows branch September 15, 2024 13:38
mosasauridae pushed a commit to mosasauridae/synfig that referenced this pull request Sep 29, 2024
On Windows (I built with CMake) for some weird reason calling ImageMagick's convert calls Windows/System32/convert.exe . It's odd because my Path env var seems to list the mingw64 directory first, but a solution is using the 'magick' syntax, where you just call 'magick' to convert as per https://imagemagick.org/script/command-line-tools.php

The problem is widely known as per https://stackoverflow.com/questions/3060205/error-invalid-parameter-fom-imagemagick-convert-on-windows , I was getting the same 'Invalid Parameter' error

The patch uses 'magick convert' (legacy syntax), instead of 'magick' for compatibility with ImageMagick 6, since many distros don't have official packages for ImageMagick 7, despite the release being over 5 years old:

    https://packages.debian.org/search?searchon=sourcenames&keywords=imagemagick
    https://packages.fedoraproject.org/pkgs/ImageMagick/ImageMagick/
    https://packages.ubuntu.com/search?keywords=imagemagick

The reason is that v7's syntax is not fully compatible with v6 but it our syntax seems safe

TL;DR:
Instead of using ImageMagick with 'convert' use 'magick convert' since Win has another 'convert' program

Supersedes: synfig#2951

Co-authored-by: Eduardo Hernández <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Ready to backport

Development

Successfully merging this pull request may close these issues.

2 participants