magick fails where convert works

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Locked
zbeekman
Posts: 2
Joined: 2017-02-10T16:14:10-07:00
Authentication code: 1151

magick fails where convert works

Post 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?

Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: magick fails where convert works

Post 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.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: magick fails where convert works

Post 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.
snibgo's IM pages: im.snibgo.com

zbeekman
Posts: 2
Joined: 2017-02-10T16:14:10-07:00
Authentication code: 1151

Re: magick fails where convert works

Post 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

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: magick fails where convert works

Post 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

Locked