Display Function Not Working in Magick++ Demos

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
Ksk5192
Posts: 3
Joined: 2016-12-01T11:20:02-07:00
Authentication code: 1151

Display Function Not Working in Magick++ Demos

Post by Ksk5192 »

I have searched all throughout the forums and cannot seem to find an answer to this question. I have installed ImageMagick version 6.9.6-6-Q16-x86-dll and am trying to run the demo project "button" in Visual Studio 2013. At first glance I noticed that the line button.display(); was commented out (why?). I un-commented it and the code runs correctly as it exits with code 0. However, the image of the button is never displayed. Any help would be appreciated, thanks.

Kyle
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Display Function Not Working in Magick++ Demos

Post by snibgo »

I believe "button.display()" outputs to an X-terminal. From your mention of a dll, you seem to be running Windows, so probably don't have X.
snibgo's IM pages: im.snibgo.com
Ksk5192
Posts: 3
Joined: 2016-12-01T11:20:02-07:00
Authentication code: 1151

Re: Display Function Not Working in Magick++ Demos

Post by Ksk5192 »

Yes, I am running Windows. Would you happen to know then how I can properly get the button to display?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Display Function Not Working in Magick++ Demos

Post by snibgo »

Does the program write to an image file? If so, type the filename at the console. Or write to "win:" or "show:".
snibgo's IM pages: im.snibgo.com
Ksk5192
Posts: 3
Joined: 2016-12-01T11:20:02-07:00
Authentication code: 1151

Re: Display Function Not Working in Magick++ Demos

Post by Ksk5192 »

I have the program write to an image file using the following code in c++:

image.write("finalimage.jpg");
image.display();

I don't understand why the line image.display() does not function. Nothing ever pops up and I have to manually go to my folder and double click the file to open the image. I have tried different extensions like .miff, .png, and .jpeg but none work. I want the program to automatically display the image when I run the compiler.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Display Function Not Working in Magick++ Demos

Post by snibgo »

Ksk5192 wrote:I don't understand why the line image.display() does not function.
I told you why.
snibgo wrote:I believe "button.display()" outputs to an X-terminal. From your mention of a dll, you seem to be running Windows, so probably don't have X.
snibgo's IM pages: im.snibgo.com
Post Reply