-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to make montage work #2
Comments
You are right that there are very few demos on I found an old post from 2010 for ImageMagick https://www.imagemagick.org/discourse-server/viewtopic.php?f=6&t=16972#p62965. My interpretation of the C code is that the wand can read multiple images. Furthermore, according to the documentation for MagickReadImage http://www.graphicsmagick.org/wand/magick_wand.html#magickreadimage, it reads an image or image sequence. I tried passing an image sequence by concatenating file names
but MagickReadImage interpreted the argument as a single filename instead of two. I also tried with a space separator. As a workaround, I used montage's command-line interface to get what I wanted. In the meantime, I may post the question on a user forum how to pass an image sequence to MatickReadImage. |
OK. I found the solution. Here is the code: (defun do-montage ()
(with-magick-wand (wand)
(%MagickReadImage wand (namestring *white-image*))
(%MagickReadImage wand (namestring *black-image*))
(with-drawing-wand (drawing-wand)
(let* ((tile-geometry "2x1+0+0")
(thumbnail-geometry "640x240+0+0")
(mode :%ConcatenateMode)
(frame "0x0+0+0")
(montaged-wand (%MagickMontageImage wand
drawing-wand
tile-geometry
thumbnail-geometry
mode
frame)))
(%MagickWriteImage montaged-wand (namestring *montage*)))))) The key part of this it's that you should |
I deleted all the useless comments I made before to avoid misunderstand when other programmers browse current page. Hope that my answer help you. |
Thank you very much for figuring it out. Using your example I defined
Thanks again |
No comments other than my previous post. |
The macro |
Hi,
I am trying to use %magickmontageimage. Based on some C code on the web, I came with following code:
However, when I examine the test file created by
do-montage
in the temp directory, I only see the black image.I played with various input parameter settings, and was unable to affect the output in any way. I suspect I am misusing the code in some way.
Any thoughts on what I am doing wrong?
Thanks
Mirko
The text was updated successfully, but these errors were encountered: