Page 1 of 1

Image.display() is not working in Magic++ API

Posted: 2010-10-29T06:46:54-07:00
by suji
hi,
i'm a new nie in Magic++;

my devlopmenet IDE is visual studio 2008 and operating system is winXPand i'm using the dlls compiled using visual studion 2008 from the sources available.

i searched a lot but couldn't find meither a working example or details.

my problem is i need to display the image i read using the IMage class.
from the help i found there is a function display in image class.

but calling the function doesn't help.

the code snippet is as follows.

Code: Select all

 string fname("C:\\test.jpeg");
Magick::Image image( fname );

image.modulate( 1.0, 1.0, 1.0 );
image.display();
image.write(fname);
somebody please help me

thanks in advance
cheers,
Suji

Re: Image.display() is not working in Magic++ API

Posted: 2010-10-29T08:48:33-07:00
by magick
The display() method requires that ImageMagick include the X11 delegate library and an X11 server to display the image to. Instead, use image.write('win:').

Re: Image.display() is not working in Magic++ API

Posted: 2010-10-30T04:41:07-07:00
by suji
hi magick,
as you suggested i tried

Code: Select all

m_image.write("win:");
but i'm getting the following exception.

"Magick: DelegateFailed `"/usr/local/bin/display" -immutable -delay 0 -window-group %g -title "%l of %f" "temporary:%i"' @ error/delegate.c/InvokeDelegate/1061"

can you please do any help?

Re: Image.display() is not working in Magic++ API

Posted: 2010-10-30T06:33:02-07:00
by magick
You do not appear to have the correct delegates.xml configuration file installed. Under Windows, the entry should look like this:
  • <delegate decode="bmp" encode="win" mode="encode" command="imdisplay.exe "%i.""/>