Qu'est-ce que le format de fichier QOI ?
Un fichier .qoi est une image « Quite OK Image », un format d'image matricielle sans perte créé par Dominic Szablewski et publié le 24 novembre 2021. Il a été conçu pour être bien plus simple et beaucoup plus rapide que le .png tout en produisant des fichiers de taille similaire. L'intégralité de la spécification tient sur une seule page, et l'encodeur ainsi que le décodeur de référence font environ 300 lignes de C.
À l'intérieur, un fichier .qoi commence par un en-tête de 14 octets qui débute par le marqueur ASCII qoif, suivi de la largeur et de la hauteur de l'image, d'un octet pour les canaux (3 pour RVB ou 4 pour RVBA) et d'un octet pour l'espace colorimétrique. Les pixels qui suivent sont compressés avec un codage par plages (RLE), un petit cache des couleurs récemment vues et un codage delta par rapport au pixel précédent. Le format est totalement sans perte, prend en charge l'alpha 8 bits et a été placé dans le domaine public sous licence CC0.
Sécurité et sûreté
RISQUE : LOWQOI is a plain image format with no scripting, macros, or embedded executable content, so a .qoi file cannot run code on its own. It also has no checksum, so a corrupted file may simply fail to decode. As with any image type, the only real risk comes from bugs in a specific decoder, so keep your viewer up to date.
Détails du format
en brefProgrammes qui ouvrent les fichiers QOI
.qoi files natively in GIMP 3.0 or later and export them to other formats. .qoi images after installing the IrfanView plugin pack, then re-save to .png or .jpg. .qoi files from the command line with magick input.qoi output.png (build 7.1.0-20 or later). .qoi file directly to view it, browse folders of them, and batch-convert to other image formats. .qoi thumbnails and previews inside Windows File Explorer. .qoi and .png with the official command-line tool qoiconv input.qoi output.png. .qoi files in Finder with a spacebar QuickLook press after installing the plugin. .qoi files with ffmpeg -i input.qoi output.png (version 5.1 or later). qoiconv input.qoi output.png for lossless PNG conversion. Détails techniques
spécifications approfondies| Encoding | Byte-aligned tagged chunks; no bit-packing across byte boundaries |
| Byte order | Big-endian (width and height stored as 32-bit big-endian integers) |
| Container | 14-byte header, variable-length data chunks, 8-byte end marker (seven 0x00 bytes followed by 0x01) |
| Compression | Lossless. Combines run-length encoding, a 64-entry running hash index of previously seen pixels, and small per-channel delta coding |
| Typical size | Comparable to PNG for the same RGB or RGBA image |
| Structure | Header holds magic 'qoif', width (u32 BE), height (u32 BE), channels (1 byte: 3=RGB, 4=RGBA), and colorspace (1 byte: 0=sRGB with linear alpha, 1=all linear). Pixels are encoded left to right, top to bottom using five chunk types: QOI_OP_RUN, QOI_OP_INDEX, QOI_OP_DIFF, QOI_OP_LUMA, and QOI_OP_RGB / QOI_OP_RGBA. The index uses the hash (r*3 + g*5 + b*7 + a*11) % 64. |
| Integrity | None. There is no CRC or checksum; a fixed 8-byte end marker signals the end of the stream |
| Color depth | 24-bit RGB or 32-bit RGBA, 8 bits per channel |
| Colorspace | sRGB with linear alpha, or all channels linear (informational flag only; does not affect decoding) |
| Platforms | Windows, macOS, Linux |
| Initial Release Full | November 24, 2021 (specification finalized as version 1.0 on January 5, 2022) |
| Reference Implementation | Single-file MIT-licensed C/C++ library qoi.h (about 300 lines). The specification itself is public domain (CC0). |
| Notes | Designed to be far faster to encode and decode than PNG (roughly 20x-50x faster encoding, 3x-4x faster decoding) while keeping file sizes similar. No animation, no tiling, no interlacing, and a maximum of 8 bits per channel. GameMaker uses QOI (with bzip2) as its default texture storage format since 2022.1. |
| Publié | 2021-11-24 |
| Dernière version | 1.0 (2022-01-05) |
| Standard ouvert | Oui · libre de droits |
| Spécification | qoiformat.org |
Conversions QOI
Q&R de la communauté
posées par les utilisateursPas encore de questions - soyez le premier à poser une question sur les fichiers QOI.
Foire aux questions
Comment ouvrir un fichier QOI ?
.qoi directement dans l'Explorateur de fichiers.Comment convertir un fichier QOI en PNG ?
qoiconv input.qoi output.png, ou utilisez ImageMagick avec magick input.qoi output.png. Les deux sont sans perte, donc le PNG contiendra exactement les mêmes pixels.Le QOI est-il meilleur que le PNG ?
Le QOI est-il sans perte ?
Le QOI prend-il en charge la transparence ?
Les fichiers QOI sont-ils sûrs à ouvrir ?
.qoi ne contient que des données d'image sans scripts ni programmes intégrés, donc en ouvrir un dans une visionneuse actuelle présente peu de risques.