SWFDBLBitmapData newSWFDBLBitmapData_fromGifInput(SWFInput input) { GifFileType *file; SWFDBLBitmapData ret; struct dbl_data gifdata; if((file = DGifOpen(input, (InputFunc) gifReadFunc)) == NULL) return NULL; if(!readGif(file, &gifdata)) return NULL; ret = newSWFDBLBitmapData_fromData(&gifdata); /* ret->input = NULL; */ return ret; }
SWFDBLBitmapData newSWFDBLBitmapData_fromGifFile(const char *fileName) { GifFileType *file; SWFDBLBitmapData ret; struct dbl_data gifdata; if((file = DGifOpenFileName(fileName)) == NULL) return NULL; if(!readGif(file, &gifdata)) return NULL; ret = newSWFDBLBitmapData_fromData(&gifdata); /* ret->input = NULL; */ return ret; }
SWFDBLBitmapData newSWFDBLBitmapData_fromGifInput(SWFInput input) { GifFileType *file; SWFDBLBitmapData ret; struct dbl_data gifdata; #if GIFLIB_MAJOR >= 5 if((file = DGifOpen(input, (InputFunc) gifReadFunc, NULL)) == NULL) #else if((file = DGifOpen(input, (InputFunc) gifReadFunc)) == NULL) #endif return NULL; if(!readGif(file, &gifdata)) return NULL; ret = newSWFDBLBitmapData_fromData(&gifdata); // ret->input = NULL; return ret; }
SWFDBLBitmapData newSWFDBLBitmapData_fromGifFile(const char *fileName) { GifFileType *file; SWFDBLBitmapData ret; struct dbl_data gifdata; #if GIFLIB_MAJOR >= 5 if((file = DGifOpenFileName(fileName, NULL)) == NULL) #else if((file = DGifOpenFileName(fileName)) == NULL) #endif return NULL; if(!readGif(file, &gifdata)) return NULL; ret = newSWFDBLBitmapData_fromData(&gifdata); // ret->input = NULL; return ret; }