Creating my own delegate on macOS #6914
Unanswered
MarkSetchell
asked this question in
Help
Replies: 1 comment
-
Good question, Mark! I would like to know the answer, also. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
ImageMagick version
7.1
Operating system, version and so on
macOS Sonoma and all previous
Description
The homebrew version of ImageMagick no longer supports X11 in any variant (even if you have Xquartz installed), so you cannot do
magick -size 640x480 xc:red display:
. I therefore tried to make a delegate that usesPreview
which is a native Apple app that will display an image. So, I made a file called$HOME/.config/ImageMagick/delegates.xml
containing:<delegate decode="miff" encode="display" spawn="True" command="magick %i %u.png && /usr/bin/open -a Preview %u.png"/>
And it works really well, I can now do:
magick -size 640x480 xc:red display:
and it displays fine. However, if I do:
magick wizard: display:
I get 2 wizards side-by-side.
And if I do:
magick rose: display:
I get a rose on the left and a similarly sized black image to its right (alpha channel?).
If I change the
delegates.xml
to PNG instead of MIFF, like this:<delegate decode="png" encode="display" spawn="True" command="magick %i %u.png && /usr/bin/open -a Preview %u.png"/>
everything works. I don't understand this. It is not related to using macOS Preview app, because it does exactly the same if I just write the file to the local directory from the delegate with something like:
<delegate decode="miff" encode="display" spawn="True" command="magick %i result.jpg"/>
Any help please?
Beta Was this translation helpful? Give feedback.
All reactions