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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
suji

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

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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:').
suji

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

Post 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?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

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

Post 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.""/>
Post Reply