Repository navigation
fix: change convert.exe syntax to avoid clash in Windows - #2951
coz-eduardo-hernandez wants to merge 2 commits into
Conversation
Can you describe your build environment/process?
Yes, I was also thinking about the same solution, but we can't use it because some OSes (like Debian 10) are still using ImageMagick 6, so they don't have the |
And that is it, I'm not sure if there's anything else that can be relevant
Aaaah, I thought the 'legacy' syntax allowed near-identical use with v6 |
|
Well, I found the reason of the issue The only sensible solution then is to pass the full path to the convert utility |
Exactly!
Agree. |
The implied precedence for system directories is due to the risk of injection of dlls which would be loaded first from the directory of the application. Other fact that I noticed from 1.4.3 and 1.5.1: there is no trace of "convert" or "magick" binaries while "convert.exe" was present in 1.2.2 |
|
mod_ffmpeg works by relying on the packager; it assumes ffmpeg.exe will always be in the same directory as synfig.exe, but that fails on the CygWin / MinGW environment I could implement a fix for imagemagick (traverse PATH looking for convert) but given the inconsistencies with other external dependencies like ffmpeg it feels like a hack. Instead I'm going to work on Synfig by starting from the base. Since that needs majority agreement, I made a new post in the forums. I hope that Konstantin can also chime in too for those general decisions |
|
|
@coz-eduardo-hernandez please edit commit messages and PR title to use Conventional Commits |
e3e8619 to
bb13c32
Compare
|
Since my 'fix' is not convenient at this time, I have no problem if the pull request is closed; an issue could be created for the convert.exe clash instead if desired. That being said, if it would be better to leave this pull request open as a reminder that the clash still happens, that's also fine with me. I'm not really sure what would fit the devs workflow best. |
What about test "magick" first? If it doesn't exist, we try traditional "convert" then. |
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]>
|
@coz-eduardo-hernandez @ice0 |
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]>
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]>
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 Co-authored-by: Eduardo Hernández <[email protected]>
|
Thank you guys! |
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]>
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:
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