Page 1 of 1

"no images for write" error when constructing Info object

Posted: 2018-07-25T07:47:37-07:00
by ethanlih
The test code:
final ClassLoader classLoader = this.getClass().getClassLoader();
InputStream is = classLoader.getResourceAsStream("Lumia-920-red.jpg");
Info info = new Info("-", is, true);
Error
Caused by: org.im4java.core.InfoException: org.im4java.core.CommandException: org.im4java.core.CommandException: magick: no images for write '-write' '-' at CLI arg 4 @ error/operation.c/CLINoImageOperator/4750.
at org.im4java.core.Info.getBaseInfo(Info.java:360)
at org.im4java.core.Info.<init>(Info.java:179)

I am running this on MacOS. I installed imagemagick by command 'brew install imagemagick'

Here is the info
$ which magick
/usr/local/bin/magick
$ ls -al /usr/local/bin/magick
lrwxr-xr-x 1 y1li wheel 40 Jul 24 13:43 /usr/local/bin/magick -> ../Cellar/imagemagick/7.0.8-8/bin/magick
$ /usr/local/bin/magick -version
Version: ImageMagick 7.0.8-8 Q16 x86_64 2018-07-23 https://www.imagemagick.org
Copyright: © 1999-2018 ImageMagick Studio LLC
License: https://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib

Please advise.