# How standard libraries read GIF files

5 GIF files from loremfile.dev, given to 2 standard-library readers in 8 runtime versions: which read them, which refuse, which differ.

The page: <https://loremfile.dev/compat/gif>.

5 GIF files given to 2 readers in 8 runtime versions. Cells of the ordinary files: reads 32, differs 0, refuses 0, crashes 0.

| File | Manifest says | go/image/gif | java/javax.imageio | Node.js (no reader) | Python (no reader) | Ruby (no reader) |
|---|---|---|---|---|---|---|
| [`edge/gif-zip-polyglot.gif`](https://loremfile.dev/edge/gif-zip-polyglot.gif) (200 B) | nothing compared | **reads** reports frames 1, height 4, width 4 | **reads** reports frames 1, height 4, width 4 | **no-reader** | **no-reader** | **no-reader** |
| [`gif/1x1.gif`](https://loremfile.dev/gif/1x1.gif) (43 B) | frames 1, height 1, width 1 | **reads** reports frames 1, height 1, width 1 | **reads** reports frames 1, height 1, width 1 | **no-reader** | **no-reader** | **no-reader** |
| [`gif/animated-10frames-256x256.gif`](https://loremfile.dev/gif/animated-10frames-256x256.gif) (37.5 KB (37,550 bytes)) | frames 10, height 256, width 256 | **reads** reports frames 10, height 256, width 256 | **reads** reports frames 10, height 256, width 256 | **no-reader** | **no-reader** | **no-reader** |
| [`gif/static-256x256.gif`](https://loremfile.dev/gif/static-256x256.gif) (4.9 KB (4,904 bytes)) | frames 1, height 256, width 256 | **reads** reports frames 1, height 256, width 256 | **reads** reports frames 1, height 256, width 256 | **no-reader** | **no-reader** | **no-reader** |
| [`gif/transparent-256x256.gif`](https://loremfile.dev/gif/transparent-256x256.gif) (3.7 KB (3,743 bytes)) | frames 1, height 256, width 256 | **reads** reports frames 1, height 256, width 256 | **reads** reports frames 1, height 256, width 256 | **no-reader** | **no-reader** | **no-reader** |

Node.js has no reader for these files. The standard library has no image decoder.

Python has no reader for these files. The standard library has no image decoder. tkinter.PhotoImage is outside the scope rule (docs/07 section 8).

Ruby has no reader for these files. The standard library has no image decoder.

The results as JSON: <https://github.com/kumarprabhashanand/loremfile/blob/main/compat/results/gif.json>.
