I am developing a program that aim to identify images, and only images. But when I use Magick::Image on a video, the library won't return after loading the entire file (using ffmpeg). I just want to get the general informations on the image (size, format, colorspace, compression...), and it should be quick. In the case of a non-image file, I don't even want anything, an error is fine. So is there a way to select the features of the library that I want to use, and disable those that don't interest me, at run time ? Like FFmpeg, and maybe other video/non-image related features ?
I'm just starting to use ImageMagick, so maybe the Image class, or even Magick++ is not the easiest way to go if I just want to get general informations on an image ?
Thank you.
Disable FFmpeg and non-image related features at run time
Re: Disable FFmpeg and non-image related features at run tim
You will have to disable the coders that you don't want to use. With coderInfoList in STL.h you will be able to get a list of all available coders. You could iterate through the coders and call MagickCore::UnregisterMagickInfo(CoderInfo->name) for the coders you don't want to be available.
Re: Disable FFmpeg and non-image related features at run tim
That sounds promising, thank you.
Re: Disable FFmpeg and non-image related features at run tim
I will add an unregister method to CoderInfo to make this easier.
EDIT: The unregister method has been added and will be available in ImageMagick 6.8.8-2.
EDIT: The unregister method has been added and will be available in ImageMagick 6.8.8-2.