Page 1 of 1

magick fails where convert works

Posted: 2017-02-10T16:20:16-07:00
by zbeekman
Hi perhaps I am misunderstanding something, but I can use convert to resize an image, but magick produces an error.

Here is the error I get:

Code: Select all

/usr/local/bin/magick -resize 16% /Users/ibeekman/Sandbox/thesis/ch-statistical-algorithm/figures/spocs_cov_abstract_factory.png /Users/ibeekman/Sandbox/thesis/build/digital/ch-statistical-algorithm/figures/spocs_cov_abstract_factory.png
magick: no images found for operation `-resize' at CLI arg 1 @ error/operation.c/CLIOption/5246.
magick: no image to apply a property "%w" @ warning/property.c/GetMagickPropertyLetter/2561.
magick: unknown image property "%w" @ warning/property.c/InterpretImageProperties/3499.
magick: no image to apply a property "%h" @ warning/property.c/GetMagickPropertyLetter/2449.
magick: unknown image property "%h" @ warning/property.c/InterpretImageProperties/3499.
magick: no image to apply a property "%m" @ warning/property.c/GetMagickPropertyLetter/2480.
magick: unknown image property "%m" @ warning/property.c/InterpretImageProperties/3499.
But this works just fine:

Code: Select all

/usr/local/bin/convert -resize 16% /Users/ibeekman/Sandbox/thesis/ch-statistical-algorithm/figures/spocs_cov_abstract_factory.png /Users/ibeekman/Sandbox/thesis/build/digital/ch-statistical-algorithm/figures/spocs_cov_abstract_factory.png
Here is the version of imagemagick I am using, installed through homebrew:

Code: Select all

/usr/local/bin/magick --version
Version: ImageMagick 7.0.4-6 Q16 x86_64 2017-01-28 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
And homebrew reports:

Code: Select all

brew info imagemagick
imagemagick: stable 7.0.4-7 (bottled), HEAD
Tools and libraries to manipulate images in many formats
https://www.imagemagick.org/
/usr/local/Cellar/imagemagick/7.0.4-5 (1,518 files, 22.5M)
  Poured from bottle on 2017-01-25 at 15:45:04
/usr/local/Cellar/imagemagick/7.0.4-6 (1,518 files, 22.5M) *
  Poured from bottle on 2017-02-02 at 15:57:44
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/imagemagick.rb
==> Dependencies
Build: pkg-config ✔
Required: libtool ✔, xz ✔
Recommended: jpeg ✔, libpng ✔, libtiff ✔, freetype ✔
Optional: fontconfig ✔, little-cms ✘, little-cms2 ✔, libwmf ✘, librsvg ✘, liblqr ✘, openexr ✘, ghostscript ✔, webp ✘, openjpeg ✔, fftw ✘, pango ✔
==> Requirements
Optional: x11 ✔, perl >= 5.5 ✔
Obviously I am on MacOS, and it is an Intel based machine. For good measure:

Code: Select all

uname -a
Darwin Izaaks-MBP.frontier.com 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
Given that, AFAIK, magick is supposed to replace convert, shouldn't this work?

Re: magick fails where convert works

Posted: 2017-02-10T16:24:51-07:00
by Bonzo
One thing I notice is you have -resize before the input image and it should be the other way around; perhaps that is more critical with version 7.

Re: magick fails where convert works

Posted: 2017-02-10T16:49:54-07:00
by snibgo
Yes, Bonzo is correct.
zbeekman wrote:magick: no images found for operation `-resize'
In v7, we can't put operations before we have any images to operate on. The general order is: read image, process it, write it.

Re: magick fails where convert works

Posted: 2017-02-10T18:21:16-07:00
by zbeekman
ah ha! I'm actually reporting this due to UseLATEX... it seems that they need to switch the order of the arguments/flags

Re: magick fails where convert works

Posted: 2017-02-10T18:59:14-07:00
by fmw42
FYI. You (or UseLatex) is using unix style commands. IM's syntax has not been that way since IM 5. IM 6 is more forgiving that IM 7 in this regard. See http://www.imagemagick.org/Usage/basics/#why