Page 1 of 1

How to display an image in a control using ImageMagick.?

Posted: 2012-08-14T04:48:01-07:00
by mbatra
Hi,

I am using ImageMagick (Magick++) for VC++ (MFC) application. I have a dialog control. I have one picture control on that dialog box.
Using ImageMagick, I am able to read an image and do some operation on it (e:g: rotate an image etc.). After doing an operation that image is written to some memory location. I want to display that image in the picture control on diaog box.

Is there any way using ImageMagick to display an image in a control.

Any help will be appreciated.!


Thanx & Regards,
mbatra

Re: How to display an image in a control using ImageMagick.?

Posted: 2012-08-15T12:20:41-07:00
by christian.
Hey there,

in Magick++ you can write an image to a specific blob in memory. And use the Blob::data() and Blob::length() functions to get the data to your displaying control in MFC. Probably best to store it for that purpose in RGB format

Code: Select all

    image.magick( "RGB" );
and not JPEG as is proposed in the linked example.