Page 1 of 1

[SOLVED] Magick++ Identify (metadata struggle)

Posted: 2017-09-21T06:56:49-07:00
by jakubrojek
I'm trying to use Magick++ in my software and i've been wondering if there is some method reflecting the 'magick identify -verbose image.tif' output?
I'm digging deeper and deeper and i cannot find relevant API, so i've been thinking about adding it to Magick++ myself.
Would it be much effort for you to point me to some place in code where i could start?
identify.c looks quite complex...

cheers, Jakub Rojek

Re: Magick++ Identify (metadata struggle)

Posted: 2017-09-21T07:16:22-07:00
by snibgo
Set the verbose flag, and write the image to "info:".

Re: Magick++ Identify (metadata struggle)

Posted: 2017-09-21T07:43:00-07:00
by jakubrojek
wow! that's indeed 'magick' :O
Okaay, to elaborate more on that, if we want to redirect that to a Magick::Blob, we do:

Magick::Blob blob;

and now we have all image info in blob. If we want to have that formatted in JSON, we set fileName to "json:"