Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIF/NONGIFの識別 #8

Open
mactkg opened this issue Apr 27, 2014 · 2 comments
Open

GIF/NONGIFの識別 #8

mactkg opened this issue Apr 27, 2014 · 2 comments

Comments

@mactkg
Copy link
Contributor

mactkg commented Apr 27, 2014

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

@mactkg
Copy link
Contributor Author

mactkg commented Apr 27, 2014

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

@mactkg
Copy link
Contributor Author

mactkg commented Apr 27, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant