Display an image with Magick++ : possible without X-Server ?

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

Display an image with Magick++ : possible without X-Server ?

Post by spok »

I'd like to display an image under Windows using Magick++ but I don't have an X-Server and I don't want to use the IMDisplay program, because I'd like to display the image directly from the memory image object.
Is there any solution ? if no, is there a solution using MagickWand or MagickCore ?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Display an image with Magick++ : possible without X-Serv

Post by magick »

Try writing your image with a filename of "win:".
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

Re: Display an image with Magick++ : possible without X-Serv

Post by spok »

if I replace

Code: Select all

picture.write(FileName);
by

Code: Select all

std::string s="win:"+FileName;
picture.write(s);


I get an exception Magick: DelegateFailed "/usr/local/bin/display" -immutable -delay 0 -window-group %g -title "%l of %f" "temporary:%i" @ error/delegate.c/InvokeDelegate/1058

By the way windows refuses to include a ":" char inside a filename
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Display an image with Magick++ : possible without X-Serv

Post by magick »

This is curious, /usr/local/bin is a Unix convention. Why would it use that path under Windows? Grab http://www.imagemagick.org/download/bin ... ws-dll.exe and install. Write to the filename "win:". Don't concatenate anything to the name. The "win:" coder is not an actual filename but a delegate program which ImageMagick recognizes and then writes the image to a temporary file and then launches a viewer.
spok
Posts: 36
Joined: 2011-10-31T07:32:23-07:00
Authentication code: 8675308

Re: Display an image with Magick++ : possible without X-Serv

Post by spok »

Well, finally I found a class that allows to display jpeg files.
However what I was really looking for is something that allows me to display the magick++ Image object directly from memory without having to write it in a file.
I don't think it's possible.
Anyhow, thanks for your help.
Post Reply