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

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
mbatra
Posts: 18
Joined: 2012-05-29T08:37:10-07:00
Authentication code: 13

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

Post 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
christian.
Posts: 2
Joined: 2012-08-14T11:09:45-07:00
Authentication code: 67789

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

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