kosendj/tumblr-jocky

GIF/NONGIFの識別

Opened this issue · 2 comments

多分ofxGifDecorderの実装見れば分かる

FREE_IMAGE_FORMAT fif = FIF_UNKNOWN;
fif = FreeImage_GetFileType(fileName.c_str(), 0);

if(fif == FIF_GIF) {
  //GIF
} else {
  //NONGIF
}

from https://github.com/jesusgollonet/ofxGifDecoder/blob/master/src/ofxGifDecoder.cpp#L24-L34

void isGif(string filename) {
  (FreeImage_GetFileType(fileName.c_str(), 0) == FIF_GIF) ? return true : return false;
}