
1x1 GIF
1x1 GIF is a Graphics Interchange Format sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
1x1.gifImage
インデックスカラー画像と簡易アニメーションに使われる形式。GIF87a/GIF89aの2種のヘッダがあります。
47 49 46 38 37 61 GIF87a47 49 46 38 39 61 GIF89aSIGNATURE = bytes.fromhex("474946383761")
OFFSET = 0
def is_gif(path: str) -> bool:
with open(path, "rb") as f:
f.seek(OFFSET)
head = f.read(len(SIGNATURE))
return head == SIGNATUREconst SIGNATURE = [0x47, 0x49, 0x46, 0x38, 0x37, 0x61];
const OFFSET = 0;
// bytes: a Uint8Array / Buffer holding the start of the file
export function isGif(bytes) {
return SIGNATURE.every((byte, i) => bytes[OFFSET + i] === byte);
}package fileid
import "bytes"
var isgifSignature = []byte{0x47, 0x49, 0x46, 0x38, 0x37, 0x61}
const isgifOffset = 0
func IsGif(b []byte) bool {
end := isgifOffset + len(isgifSignature)
if len(b) < end {
return false
}
return bytes.Equal(b[isgifOffset:end], isgifSignature)
}const SIGNATURE: &[u8] = &[0x47, 0x49, 0x46, 0x38, 0x37, 0x61];
const OFFSET: usize = 0;
fn is_gif(bytes: &[u8]) -> bool {
bytes.get(OFFSET..OFFSET + SIGNATURE.len()) == Some(SIGNATURE)
}<?php
$signature = "\x47\x49\x46\x38\x37\x61";
$offset = 0;
function is_gif(string $bytes): bool {
global $signature, $offset;
return substr($bytes, $offset, strlen($signature)) === $signature;
}Graphics Interchange Format は画像のプレビュー、サムネイル、メタデータ確認、アップロード検証などで広く使われます。解像度・アルファ・圧縮・ファイルサイズが実装の挙動に影響するため、複数のサイズでテストしてください。
メディアファイルも、壊れたメタデータ・極端な寸法・長い再生時間・異常なチャンクでデコーダに負荷をかけることがあります。処理前にサイズ・寸法・長さを読み取ってください。
11 個のサンプルで、極小画像・高解像度画像・アルファチャンネル・圧縮しにくいアセットをテストできます。

1x1 GIF is a Graphics Interchange Format sample generated for file format testing. It can be used to test downloads, parsers, previews, and file type detection.
1x1.gif
Blue Sky GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 96 x 72. It can be used to test downloads, parsers, previews, and file type detection.
01-blue-sky.gif4fe4554fb7eb8920681a37b43035b8cd6cdb94869ccbbca60d484b47e9371e1d
Flower Garden GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 160 x 90. It can be used to test downloads, parsers, previews, and file type detection.
02-flower-garden.gifeb1da0c8aec6b337ab6abc292a3cda4c8569a39d7e69bf57c16861e6f20315af
Navy Blue Sky GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 256 x 128. It can be used to test downloads, parsers, previews, and file type detection.
03-navy-blue-sky.gifdd308bc7618cc18f8e98e88125947ce91e33cd64ea848fd4aa576f3da7a3a1bd
Nature of the Sky GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 360 x 270. It can be used to test downloads, parsers, previews, and file type detection.
04-nature-sky.gifc6887346eeaf19a2072aa65bcb1b70ef5891913e4fc78e5be85e3e124803876b
Sky Landscape GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 512 x 384. It can be used to test downloads, parsers, previews, and file type detection.
05-sky-landscape.gifd4a52af9bb7c49d41ff42926b4708c698a9e03303d33df6a750787b2ebcab072
Starry Sky GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 720 x 480. It can be used to test downloads, parsers, previews, and file type detection.
06-starry-sky.gifdc373d7e797e546a709403ad8b648f630f1c2e78fb1dbc78247527789c6a0f99
Blue Night Sky GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 960 x 640. It can be used to test downloads, parsers, previews, and file type detection.
07-blue-night-sky.gifad72a17789fbe7f26e9691fd6355e3672c4f7d2ba7d8dbd2d0a2942eb5d3fa7b
Hibiscus Flower GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 1280 x 2770. It can be used to test downloads, parsers, previews, and file type detection.
08-hibiscus-flower.gif1284d2d2ae1365187adee386b5630766fb5452e2f61189342888b5adddf42065
Arctic Sky GIF is a Graphics Interchange Format sample based on Wikimedia Commons, 1600 x 1062. It can be used to test downloads, parsers, previews, and file type detection.
09-arctic-sky.gif8c3e6a7a91f978f524a5b885c955ad22b912c71e62f7e6119a2b133c46499fd7
NASA Blue Marble GIF is a Graphics Interchange Format sample based on NASA Image and Video Library, 640 x 640. It can be used to test downloads, parsers, previews, and file type detection.
nasa-blue-marble-2012-east.gif102a04cf58beec5478958cc4d88bf5b2ddd21d19aef22a2f3b67bb2e3f4f0760Graphics Interchange Format ファイルはバイトシグネチャ 47 49 46 38 37 61 ("GIF87a") または 47 49 46 38 39 61 ("GIF89a") で始まります。拡張子に頼らず、この先頭バイトを読み取って形式を判定してください。
Graphics Interchange Format のMIMEタイプは image/gif です。
Graphics Interchange Format ファイルは .gif 拡張子を使います。拡張子は慣習にすぎず中身を保証しないため、シグネチャや構造のチェックと組み合わせてください。