"no images for write" error when constructing Info object

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
ethanlih
Posts: 1
Joined: 2018-07-25T07:35:18-07:00
Authentication code: 1152

"no images for write" error when constructing Info object

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