NVGIF logo

This is version 6 of the Not Very Good Image Format

NVGIF is a tiny, simple image format designed for fun, experimentation, and learning. Despite its tongue‑in‑cheek name, NVGIF is only slightly larger than PNG on average, and it comes with clear specs and 4(!) reference implementations. As it has so many implementations, that basically proves it's a standard.

Version 6 introduces simple CRC32 error checking to NVGIF.

How do I use this repo?

The GitHub repo isn't really meant to be cloned. Cloning is only required if you want to contribute. Instead, view files and download individual files (or folders using download-directory.github.io).

File Extensions and Mimetype

The MIME type of NVGIF files is image/x-nvgif.

Extension Versions Supported Notes
.nvg v1–v6 General extension, recommended for everyday use
.nvg1 v1 Explicit version marker (optional)
.nvg2 v2 Explicit version marker (optional)
.nvg3 v3 Explicit version marker (optional)
.nvg4 v4 Explicit version marker (optional)
.nvg5 v5 Explicit version marker (optional)
.nvg6 v6 Explicit version marker (optional)

NOTE: None of the reference decoders really care about the file extension, so it's more of a human thing.

Reference Implementations

The Github repo contains 4 reference implementations of NVGIF:

There is also one binding for NVGIF:

Detailed API docs are in NVGIF Implementations.

Specification

The specification can be found here. It used to be at https://tiashdev.github.io/tiashfam-resources/nvgif/specs/.

NVGIF CLI Tool

A standalone NVGIF encoder/decoder is available as a command-line utility. It supports version-aware encoding, decoding, and header inspection across all NVGIF versions.

It is located in the python/ directory in the Github repo as nvgif_cli.py. As it uses the Python implementation of NVGIF, it needs Pillow to function. You need Python >=3.12 to run it.

This tool is ideal for scripting, testing, or integrating NVGIF into your own pipelines.

Example Usage

Encode a PNG file into NVGIF v4:

python nvgif_cli.py encode input.png output.nvg --version 4

Convert an .nvg file back into a standard PNG:

python nvgif_cli.py decode input.nvg output.png

Display an NVGIF file's header and metadata:

python nvgif_cli.py info input.nvg

View an NVGIF image in a resizable window:

python nvgif_cli.py view image.nvg

Launches a graphical window with the image rendered over a checkerboard background (for transparency). Handy for previewing .nvg files without converting to PNG.

For more options, run:

python nvgif_cli.py --help