Page 1 of 1

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

Posted: 2011-12-11T02:53:41-07:00
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 ?

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

Posted: 2011-12-11T07:41:11-07:00
by magick
Try writing your image with a filename of "win:".

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

Posted: 2011-12-11T08:09:57-07:00
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

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

Posted: 2011-12-11T18:45:04-07:00
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.

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

Posted: 2011-12-12T08:11:45-07:00
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.