{"success":true,"data":{"ext":"gif","name":"Graphics interchange format file","description":"Graphics Interchange Format (GIF) is a raster image file format created by CompuServe and later standardized and maintained by the broader internet standards community. It is commonly used for simple graphics, logos, short animations, and web images with limited color palettes. GIF is a mature format with broad support across platforms, and while generally safe, files from untrusted sources may still be used to conceal malicious content or exploit parser flaws in image software.","mime":["image/gif"],"risk_level":"Safe","signatures":[{"hex":"47 49 46 38 37 61","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"47 49 46 38 39 61","offset":0,"sources":[{"name":"Apache Tika","url":"https://raw.githubusercontent.com/apache/tika/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml"},{"name":"Wikipedia","url":"https://en.wikipedia.org/wiki/List_of_file_signatures"},{"name":"Gary Kessler","url":"https://www.garykessler.net/library/file_sigs_GCK_latest.html"}]},{"hex":"47 49 46 38","offset":0,"sources":[{"name":"Neil Harvey FileSignatures","url":"https://raw.githubusercontent.com/neilharvey/FileSignatures/master/src/FileSignatures/Formats/Gif.cs"}]}],"related":["png","avif","bmp","cr2","cr3","dib"],"usage":{"python":"def is_gif(file_path: str) -> bool:\n    \"\"\"Check if file is a valid GIF by magic bytes.\"\"\"\n    signature = bytes([0x47, 0x49, 0x46, 0x38, 0x37, 0x61])\n    with open(file_path, \"rb\") as f:\n        return f.read(6) == signature","node":"function isGIF(buffer: Buffer): boolean {\n  const signature = Buffer.from([0x47, 0x49, 0x46, 0x38, 0x37, 0x61]);\n  return buffer.subarray(0, 6).equals(signature);\n}","go":"func IsGIF(data []byte) bool {\n    signature := []byte{0x47, 0x49, 0x46, 0x38, 0x37, 0x61}\n    if len(data) < 6 {\n        return false\n    }\n    return bytes.Equal(data[:6], signature)\n}"},"category":"Images"}}