Image Magick not functioning

   7781   14   4
User Avatar
Member
1 posts
Joined: Sept. 2017
Offline
I am getting an error of Could not find executable ‘CPROGRA~1/SIDEEF~1/Houdini’ when attempting to use the image magick nodes. I have installed the program and set up my env variables as so:
PDG_IMAGEMAGICK=“C:\Program Files\ImageMagick-7.0.8-Q16\magick.exe”
PDG_FFMPEG=“CProgram Files/ImageMagick-7.0.8-Q16/ffmpeg.exe”

FFMPEG isa functioning as expected its just image magick that is failing.
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
That all looks fine to me – the only difference between the two that I see is the forward/backslashes. Can you try forward slashes for the ImageMagick path?
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline


I'm also having trouble with imagemagick and when I hit the info, no error messages are being displayed.
I'm with hou 17.5.286 and ImageMagick-7.0.8-Q16 on Win10 machine.


this is my env:
PDG_IMAGEMAGICK = "C:/ADN/houdini new tests/ImageMagick-7.0.8-Q16/magick.exe"
PDG_FFMPEG = "C:/ADN/houdini new tests/ImageMagick-7.0.8-Q16/ffmpeg.exe"

I tried also to specify a custom path in the node itself but it still fails.
Edited by Andr - June 15, 2019 06:52:59
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
If you double click on the failed work item, it should show a log with the error message and more information. Can you post the log here?
User Avatar
Member
900 posts
Joined: Feb. 2016
Offline
oh thanks, I was not aware of this log.
It turns out that Hou was looking for imagemagick in the `program files` directory even if the $PDG_IMAGEMAGICK variable was set to another directory.
I re-installed imagemagick in the program files directory. Now it's working fine.


This is the log:

montage: UnableToOpenConfigureFile `colors.xml' @ warning/configure.c/GetConfigureOptions/699.
montage: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/699.
montage: UnableToOpenModuleFile ‘C:\Program Files\ImageMagick-7.0.8-Q16\modules\coders\IM_MOD_RL_EXR_.dll’: No such file or directory @ warning/module.c/GetMagickModulePath/675.
montage: NoDecodeDelegateForThisImageFormat `EXR' @ error/constitute.c/ReadImage/556.
montage: UnableToOpenModuleFile ‘C:\Program Files\ImageMagick-7.0.8-Q16\modules\coders\IM_MOD_RL_EXR_.dll’: No such file or directory @ warning/module.c/GetMagickModulePath/675.
montage: NoDecodeDelegateForThisImageFormat `EXR' @ error/constitute.c/ReadImage/556.
montage: UnableToOpenModuleFile ‘C:\Program Files\ImageMagick-7.0.8-Q16\modules\coders\IM_MOD_RL_EXR_.dll’: No such file or directory @ warning/module.c/GetMagickModulePath/675.
montage: NoDecodeDelegateForThisImageFormat `EXR' @ error/constitute.c/ReadImage/556.
montage: UnableToOpenModuleFile ‘C:\Program Files\ImageMagick-7.0.8-Q16\modules\coders\IM_MOD_RL_EXR_.dll’: No such file or directory @ warning/module.c/GetMagickModulePath/675.
montage: NoDecodeDelegateForThisImageFormat `EXR' @ error/constitute.c/ReadImage/556.
montage: MissingAnImageFilename `CADN/houdini new tests/PDG_exp/tops_lesson_start/images/city_01.imagemagick20.png' @ error/montage.c/MontageImageCommand/1754.
Executing command: “CADN/houdini new tests/ImageMagick-7.0.8-Q16/magick.exe” montage -background black -mode concatenate “CADN/houdini new tests/PDG_exp/tops_lesson_start/render/city_01.overlaytext1.0.exr” “CADN/houdini new tests/PDG_exp/tops_lesson_start/render/city_01.overlaytext1.1.exr” “CADN/houdini new tests/PDG_exp/tops_lesson_start/render/city_01.overlaytext1.2.exr” “CADN/houdini new tests/PDG_exp/tops_lesson_start/render/city_01.overlaytext1.3.exr” “CADN/houdini new tests/PDG_exp/tops_lesson_start/images/city_01.imagemagick20.png”
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Hi Andr,

Based on that log, it looks like $PDG_IMAGEMAGICK was successfully finding the Imagemagick executable, as those error messages are coming from Imagemagick itself.

I'm wondering if you perhaps installed Imagemagick using the Windows binary installer?
User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
You need to install a self-contained ImageMagick, one that does fall back to built-in settings (like color.xml). I haven't used IM inside Houdini (mostly because I tend to use openCV instead of IM), so I am not sure which installation package comes with H's IM.

You could rebuild your IM and define MAGICKCORE_ZERO_CONFIGURATION_SUPPORT, which should sufficiently take care of such fall-backs.


Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
16 posts
Joined: Jan. 2015
Offline
Hi BrandonA and everyone.

I have problem with imagemagick node with “montage” operation.
It fails when cooking and gives me the log below.

magick: no images found for operation `-mode' at CLI arg 5 @ error/operation.c/CLIOption/5332.
Executing command: “/usr/local/Cellar/imagemagick/7.0.10-13/bin/magick” -label ‘mymontage0’ -background black -mode concatenate “/Applications/Houdini/Houdini18.0.416/Frameworks/Houdini.framework/Versions/18.0/Resources/houdini/help/examples/nodes/top/imagemagick/terrain_images/inputs/ridges-inputs-001.png” “/Applications/Houdini/Houdini18.0.416/Frameworks/Houdini.framework/Versions/18.0/Resources/houdini/help/examples/nodes/top/imagemagick/terrain_images/targets/ridges-targets-001.png” “/Users/akira/projects/learning_PDG/images/imagemagick10.jpg”

I am trying with the official example scene.
https://www.sidefx.com/docs/houdini/nodes/top/imagemagick.html#examples [www.sidefx.com]

So the images are definitely there.
And imagemagick itself is executable (no problem with “convert” operation).

Here is my system.
OS : macOS (latest version)
Houdini : 18.0.416
imagemagick : stable 7.0.10-14
I installed imagemagick by homebrew.

Any help?

Cheers

Attachments:
imagemagick_issue_brewinfo.jpg (125.6 KB)

User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Hi, Akira,

two ideas come to mind:
a) Is there really a line break between the two input images to your concatenate command? From your quote it looks like it and this would most definitely be wrong.
b) Have you tried executing the exact command line that is giving you an error to check if it works outside the Houdini context? If not that would be the best bet to figure out what goes wrong. It *might* be that the quotes you are using are misinterpreted by your OS.


Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Member
16 posts
Joined: Jan. 2015
Offline
Hi, malbrecht,

Thank you for your reply.

I followed your plan:B idea and think I found a kind of solution.
Here it is.
Add “montage” command in the node's Command Line after {imagemagick}.

I've tried the command in the terminal with same failure and error messages.
And after more imagemagick oriented searching, I ended up at the forum below which gave me a hint.
http://www.imagemagick.org/discourse-server/viewtopic.php?t=29664 [www.imagemagick.org]

As using a macOS I define “PDG_IMAGEMAGICK” to “magick” which is an UNIX executable(command?).
PDG_IMAGEMAGICK = “/usr/local/Cellar/imagemagick/7.0.10-13/bin/magick”
And apparently this “magick” command (new in ImageMagick ver.7) alone doesn't operate montage.

One more thing.
I also need an additional “composite” command in the Command Line for “Composite” operation.

I'm pretty happy finding a solution, but I still don't understand what is going on.
Is this a Houdini issue or am I doing something wrong?

By the way, yes, it looks like there is a line break in my previous post, but no, there isn't in the command.
Try copy&paste somewhere the command and you will see.

Akira

Attachments:
imagemagick_motage_add.jpg (84.1 KB)

User Avatar
Member
806 posts
Joined: Oct. 2016
Offline
Hi,

not using MacOS my ability to help is quite limited, I am afraid. However, I have suffered from using ImageMagick a lot and, yes, the way the different command line tools operate has changed over time. Where in the past you could use the “convert” command (a single executable), a standard compilation today will require you to use “magick convert”. It's quite possible that specific commands have disappeared / integrated / combined.

{sidenote:
While I do see the benefit of Houdini using external applications for tasks, using “Open Source” tools in my world has always been a critical and not-for-production choice of solving problems. Open Source tools tend to change their behaviour and “blindly” updating tool versions in a pipeline setup is prone to break everything. My suggestion here really is to replace more or less simple tasks like a “montage” by Houdini-internal solutions (after all, Houdini CAN do image montages) - but that's a hint towards SideFX, not so much towards the user that only wants to get on with their own job.
}

Trying to answer your question: I do not think that you are doing anything wrong. Since ImageMagick is an external tool that is not maintained by SideFX, it is possible (and in fact almost guaranteed) that older example use cases in Houdini's documentation will fail using newer versions of such external tools. Users may have to adjust to that …


Marc
---
Out of here. Being called a dick after having supported Houdini users for years is over my paygrade.
I will work for money, but NOT for "you have to provide people with free products" Indie-artists.
Good bye.
https://www.marc-albrecht.de [www.marc-albrecht.de]
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Hi Akira,

Glad you found a solution for now. The reason for this is that Imagemagick may be invoked in different ways depending on which installation of the program you are using.

For example, in some installations you call magickdirectly, and specify the subcommand as an argument:

magick montage
magick convert

In other installations, you call the subcommands directly:

montage
convert

I believe that some installations also support both. It looks like the first mode of operation is not being handled on MacOS (invoking the subcommand as an argument to magick. I will file a bug for this. I will also file a bug to update the node documentation with more clarification about the different ways that Imagemagick can be invoked.

Are you able to call the subcommands directly with your installation? If so, the easiest setup would be putting the Imagemagick binary folder on your system path.

Lastly, there will be some work done on the Imagemagick node to make this easier and more seamless for the user.
Edited by BrookeA - May 26, 2020 11:24:48
User Avatar
Member
16 posts
Joined: Jan. 2015
Offline
Thank you, Mark and Brandon.

Glad to hear about filling bugs and work on the Imagemagick node.

Are you able to call the subcommands directly with your installation? If so, the easiest setup would be putting the Imagemagick binary folder on your system path.

Yes the subcommands(at least the montage one) are functionable in the terminal without “magick” command.
But I am not quite sure about the “Imagemagick binary folder” and “my system path”.
Binary folder: ~/imagemagick/7.0.10-14/bin?
System path: PDG_IMAGEMAGICK in the houdini.env?
If so, it doesn't work.

{sidenote:
While I do see the benefit of Houdini using external applications for tasks, using “Open Source” tools in my world has always been a critical and not-for-production choice of solving problems. Open Source tools tend to change their behaviour and “blindly” updating tool versions in a pipeline setup is prone to break everything. My suggestion here really is to replace more or less simple tasks like a “montage” by Houdini-internal solutions (after all, Houdini CAN do image montages) - but that's a hint towards SideFX, not so much towards the user that only wants to get on with their own job.
}

Yes, with the problems, I do struggle a lot but I also learned a lot.
I have almost never lay a finger on the terminal before: I was too frightened.
For the Houdini-internal solution, I guess it could be done by COPs approach with mosaic node.
Right?
Cheers
User Avatar
Staff
387 posts
Joined: Aug. 2017
Offline
Hi Akira,

In order to make things easier on Mac, I've added support for a PDG_IMAGEMAGICK_DIR variable. Instead of setting the PDG_IMAGEMAGICK variable, please set the PDG_IMAGEMAGICK_DIR variable to the location of your ImageMagick binary folder (e.g. ~/imagemagick/7.0.10-14/bin). This will allow the node to find the executables of all the various subcommands (convert, montage, etc.).

This fix will be available in the next Houdini daily build of 18.0 (18.0.481 or later).
User Avatar
Member
16 posts
Joined: Jan. 2015
Offline
Hi Brandon,

I tried your instruction with the latest daily build (18.0.484),
and it works fine!

Thank you very much for all of your support.

Cheers!
  • Quick Links