length of profile? in MagickRemoveImageProfile()

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
DJTurboToJo

length of profile? in MagickRemoveImageProfile()

Post by DJTurboToJo »

how can I get the length for an profile.

This is needed for MagickRemoveImageProfile

Code: Select all

  unsigned char *MagickRemoveImageProfile(MagickWand *wand,
    const char *name,size_t *length)
When I want to remove all profiles I could also use:
1.

Code: Select all

  MagickBooleanType MagickStripImage(MagickWand *wand)
Then I wouldnt need a length!
2.

Code: Select all

  MagickBooleanType MagickProfileImage(MagickWand *wand,const char *name,
    const void *profile,const size_t length)
with name = '*' and profile = 'NULL'. Well then I need again the size.

Can someone tell me where I can find more detailed information than on the homepage of imagemagick about all these different methods?

Thanks,
TurboToJo
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: length of profile? in MagickRemoveImageProfile()

Post by el_supremo »

You don't need to know the length of the profile before calling MagickRemoveImageProfile. The length is that of the returned profile, which is why you must pass the address of the "length" variable.
If it does return a profile, you have to relinquish the memory once you're done with it.
Can someone tell me where I can find more detailed information than on the homepage of imagemagick about all these different methods?
That's about it unless you can read the source code.

Pete
Post Reply