Page MenuHomeDevCentral

Allow igal2 to operate with ImageMagick 7
Open, LowPublic

Description

In D2123, the package ImageMagick7 could have been used, but igal2 package still depends of ImageMagick 6.

As igal2 only uses ImageMagick to create thumbnails, without any alpha / colorspace manipulation, it should work with ImageMagick 7.

Command analysis

The following commands are used at commit 26e31b7efc4 in igal2 Perl script:

LineImageMagick 6 commandImageMagick 7 commandStatus
367convert $opt_con -scale x$opt_y \"$fullfile\" \"$fullthumb\"
371identify -ping -format \"\%wx\%h %b\" \"$fullfile\"
379convert $opt_con -scale $dimension \"$fullfile\" \"$fullthumb\"
404identify -ping -format \"\%wx\%h %b\" \"$fullfile\"
430convert $opt_con -scale x$opt_bigy \"$fullfile\" \"$fullslide\"
446identify -ping -format \"\%wx\%h %b\" \"$fullslide\"
636identify -ping -format \"\%wx\%h %b\" \"$opt_d\/$opt_dest.$itile\"
638mogrify -scale x$opt_t $opt_d/$opt_dest.$itile
721identify -ping -format \"\%wx\%h\" \"$opt_d/$thumb\"

-ping allows to "efficiently determine image characteristics" (command line options).

Event Timeline

dereckson created this task.
dereckson moved this task from Backlog to Dependencies on the freebsd-port-wanted board.
dereckson updated the task description. (Show Details)

We can wait upstream updates for the ImageMagick 7 API, especially as upstream was active in November 2019.

The ImageMagick 6 API is still usable in 7, ie we don't need to immediately port the commands.

Works fine on WindRiver with ImageMagick 7 and Wikimedia Commons pictures of the day from February 2020 as test:

image.png (380×1 px, 196 KB)

dereckson added a project: upstream.

As the port is maintained, the best course of action is to send a patch for this port upstream.

According https://imagemagick.org/script/porting.php:

  • convert can be replaced by magick
  • identify can be invoked by a symlink or through magick ; documentation doesn't state anything about arguments
  • mogrify can also be invoked by a symlink or through magick ; documentation doesn't state anything about arguments either

What about webserver-alkane role?

This is a complicated migration, because there is a conflict on FreeBSD packages between ImageMagick6-nox11 and ImageMagick7-nox11, and web applications rely on those utilities.

According this support thread, MediaWiki seems happy to use ImageMagick 7, but we can't do that assertion for everything, as the porting documentation shows some differences, and we don't have a .

As such, it's probably safer to install ImageMagick 7 to /opt/ImageMagick7 with a symlink to provide the magick command in bin path, so "surprise" / "hidden" / "rogue" / "non documented" calls can still use ImageMagick 6, and educated documented case can invoke version 7 through magick.