Fix types in typed/file/gif

Thanks to WarGrey Gyoudmon Ju for reporting the bug

Please merge to v6.0.1