WriteImage Question

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
archael

WriteImage Question

Post by archael »

Hello,

Why does WriteImage require an ImageInfo structure argument? From what I understand, ImageInfo is to be used for reading because there is no information on an image before reading it.. but why does WriteImage need one? Everything should be set in the Image structure argument should it not? Or does writing copy the Image structure to the ImageInfo structure? Or does it completely neglect ImageInfo if Image is valid?

As you can see, I'm pretty confused by it at the moment. I have it working but I'm just not sure if my image->quality is getting registered.. I'm currently giving a value of 80 to the ImageInfo structure passed to WriteImage but am not changing the image's quality.. What should I do?

Doing this with MagickCore 6.4.1.

Help appreciated,
Jon
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: WriteImage Question

Post by magick »

We use the image_info structure to set certain attributes that are not members of the image structure such as image type. We also use it to pass user defined memory blobs or files handles.

For compression quality, set the image->quality memory before you call WriteImage().
Post Reply