Using Magick++ to determine if an image contains multiple frames
Posted: 2015-06-11T20:17:07-07:00
I am using magick++ on my website to process uploaded images. I would like to be able to test if an uploaded file contains multiple frames (whether animated or still) and to process them differently depending. What is the most efficient way to perform this test? All I could think of would be:
Is there a more efficient way?
Code: Select all
std::list<Magick::Image> images;
readImages( &images, "uploaded file" );
if (images.size()==1) {
//process as single image
}
else {
//process multiple frames
}