Page 1 of 1

Disable FFmpeg and non-image related features at run time

Posted: 2014-01-07T13:18:04-07:00
by deck
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.

Re: Disable FFmpeg and non-image related features at run tim

Posted: 2014-01-07T14:14:51-07:00
by dlemstra
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

Posted: 2014-01-07T14:40:01-07:00
by deck
That sounds promising, thank you.

Re: Disable FFmpeg and non-image related features at run tim

Posted: 2014-01-07T15:42:13-07:00
by dlemstra
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.