Use magick command from ImageMagick #854

Open
nil wants to merge 1 commit from nil/akkoma:develop into develop
First-time contributor

With ImageMagick version 7 the convert command has been deprecated in favour of magick. Calling convert instead results in the logs being spammed with warning messages.

The mogrify Elixir wrapper also runs magick with the mogrify argument in current relases.

With ImageMagick version 7 the `convert` command has been deprecated in favour of `magick`. Calling `convert` instead results in the logs being spammed with warning messages. The mogrify Elixir wrapper also runs `magick` with the `mogrify` argument in current relases.
nil added 1 commit 2024-11-19 19:56:19 +00:00
Use magick command from ImageMagick
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
c48f5d57b6
With ImageMagick version 7 the convert command has been deprecated in
favour of magick. Calling convert instead results in the logs being
spammed with warning messages.

The mogrify Elixir wrapper also runs magick with the mogrify argument
in current releases.
Oneric reviewed 2024-11-23 02:19:10 +00:00
Oneric left a comment
Member

We still support environments without ImageMagick 7 readily available. E.g. current Debian stable doesn’t have it yet and we even support oldstable atm. So I don’t think we can just indiscriminately migrate everyone to magick yet.

The mogrify Elixir wrapper also runs magick with the mogrify argument in current relases.

Looking at their code they only do seem to do so by default on Windows atm, but they provide config options to select which commands are used.
Note it always uses magick <command>, while this patch adapts convert to magick only. The latter form appears to work too for simple operations at least, but idk if there are ambiguities or other reasons to prefer magick convert instead.

I guess we could either piggy-back on mogrify’s config settings or introduce our own for both running the actual command and availability checks,

We still support environments without ImageMagick 7 readily available. E.g. current Debian stable doesn’t have it yet and we even support oldstable atm. So I don’t think we can just indiscriminately migrate everyone to `magick` yet. > The mogrify Elixir wrapper also runs magick with the mogrify argument in current relases. Looking [at their code](https://github.com/elixir-mogrify/mogrify/blob/e2938de7b7011a8b3b58e2a4467e9dfc8bbaed23/lib/mogrify.ex#L474-L479) they only do seem to do so by default on Windows atm, but they provide config options to select which commands are used. Note it always uses `magick <command>`, while this patch adapts `convert` to `magick` only. The latter form appears to work too for simple operations at least, but idk if there are ambiguities or other reasons to prefer `magick convert` instead. I guess we could either piggy-back on `mogrify`’s config settings or introduce our own for both running the actual command and availability checks,
Author
First-time contributor

We still support environments without ImageMagick 7 readily available. E.g. current Debian stable doesn’t have it yet and we even support oldstable atm. So I don’t think we can just indiscriminately migrate everyone to magick yet.

The mogrify Elixir wrapper also runs magick with the mogrify argument in current relases.

Looking at their code they only do seem to do so by default on Windows atm, but they provide config options to select which commands are used.
Note it always uses magick <command>, while this patch adapts convert to magick only. The latter form appears to work too for simple operations at least, but idk if there are ambiguities or other reasons to prefer magick convert instead.

I guess we could either piggy-back on mogrify’s config settings or introduce our own for both running the actual command and availability checks,

My experience with Elixir is somewhat limited so far, but I can try to amend this PR accordingly.

> We still support environments without ImageMagick 7 readily available. E.g. current Debian stable doesn’t have it yet and we even support oldstable atm. So I don’t think we can just indiscriminately migrate everyone to `magick` yet. > > > The mogrify Elixir wrapper also runs magick with the mogrify argument in current relases. > > Looking [at their code](https://github.com/elixir-mogrify/mogrify/blob/e2938de7b7011a8b3b58e2a4467e9dfc8bbaed23/lib/mogrify.ex#L474-L479) they only do seem to do so by default on Windows atm, but they provide config options to select which commands are used. > Note it always uses `magick <command>`, while this patch adapts `convert` to `magick` only. The latter form appears to work too for simple operations at least, but idk if there are ambiguities or other reasons to prefer `magick convert` instead. > > I guess we could either piggy-back on `mogrify`’s config settings or introduce our own for both running the actual command and availability checks, My experience with Elixir is somewhat limited so far, but I can try to amend this PR accordingly.
Author
First-time contributor

Note it always uses magick <command>, while this patch adapts convert to magick only. The latter form appears to work too for simple operations at least, but idk if there are ambiguities or other reasons to prefer magick convert instead.

The magick convert variant is deprecated as well and will result in the same kind of warning as running convert.

> Note it always uses `magick <command>`, while this patch adapts `convert` to `magick` only. The latter form appears to work too for simple operations at least, but idk if there are ambiguities or other reasons to prefer `magick convert` instead. The `magick convert` variant is deprecated as well and will result in the same kind of warning as running `convert`.
Some checks are pending
ci/woodpecker/pr/build-amd64 Pipeline is pending approval
ci/woodpecker/pr/build-arm64 Pipeline is pending approval
ci/woodpecker/pr/docs Pipeline is pending approval
ci/woodpecker/pr/lint Pipeline is pending approval
ci/woodpecker/pr/test Pipeline is pending approval
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u develop:nil-develop
git checkout nil-develop
Sign in to join this conversation.
No description provided.