Each is its own module with its own release line. The three forks of Go's own codecs carry their changes in a NOTICE and pass Go's suite unaltered; a reader registers itself with image.Decode, so a caller imports it for its side effect and never names it again.
The library: the scikit-image vocabulary in pure Go. Filters (GaussianBlur, BoxBlur, Median, Sharpen), edges (Sobel, Prewitt, Scharr, Laplacian, Canny), morphology (Erode, Dilate), geometry (Resize, Rotate, Crop, Flip) and colour (Grayscale, RGBToHSV, Otsu). SIMD kernels from go-asmgen on amd64 (SSE2), arm64 (NEON) and s390x (vector), and it beats scikit-image on the separable hot operations โ box blur and Sobel โ with pages that say where it does not.
repository ยท pkg.go.dev
One picture in, two eyes out. Depth guessed from cues in the picture itself (Cues), softened (Soften), and both eyes synthesised (Views) โ for a headset or a 3D display. โ It takes any depth map, so a real network can be substituted: this is the whole answer only where none is available, including in a browser. One pass over the source columns per row and no global sort โ 6.3 ms for a 4K frame on sixteen cores, 46.9 ms on a telephone โ checked against a GPU implementation of the same rule, byte for byte.
repository ยท pkg.go.dev
Photoshop files (.psd, .psb) for image.Decode. โ The flattened composite, deliberately: reading layers means re-implementing a compositor, and the composite is what Photoshop itself shows. Bitmap, Grayscale, Indexed, RGB, CMYK, Duotone and Lab; 1, 8 and 16 bits a channel; raw and RLE. โ CMYK is stored inverted (255 is no ink) and alpha is straight โ the two readings that otherwise come out as a photographic negative and as every edge pixel too bright. Judged against sips, which is ImageIO and has nothing to do with this code: exact on 2 073 600 pixels of a real file.
repository ยท pkg.go.dev
A fork of Go’s image/png, under the same licence, with every change stated in its NOTICE and Go’s own suite passing unaltered. What differs: DecodePartial says what a stream that stopped early did decode โ the first rows, and the error that stopped it โ because a picture still arriving is not the same thing as a picture that failed.
repository ยท pkg.go.dev
A fork of Go’s image/jpeg. What differs: a four-component JPEG’s chroma is upsampled the way libjpeg does โ reading between the samples โ rather than by repeating each one, which is what made CMYK scans come back softer here than everywhere else.
repository ยท pkg.go.dev
A pure-Go JPEG 2000 codec (.j2k, .jp2, decode and encode), forked from ajroetker/go-jpeg2000 with every change stated in its NOTICE. โ A file that says CMYK decodes to an *image.CMYK: read as red, green and blue it lost the black plate, 255 levels off poppler on every pixel, and it is now at most 2 over 2 440 044 samples. Tiled encodes now land where the decoder and OpenJPEG read them. The lossless colour transform and the inverse 5/3 wavelet are plain loops, because the SIMD path took an allocating fallback on amd64. A lossless 1080p decode there went from 638 ms and 14.55 million allocations to 269 ms and 93 thousand, and arm64 is not slower. โ Not yet under the organisation’s 100% coverage gate: it is tested on eight architectures, but its coverage is not gated.
repository ยท pkg.go.dev
A fork of Go’s image/gif, with the same DecodePartial as png: the first frame at its full declared size, the number of pixel rows that are complete counting from the top, and the error that stopped the decode.
repository ยท pkg.go.dev
WebP encoding in pure Go: the RIFF container, a lossless VP8L encoder (the pixels out bit for bit as they went in) and a lossy VP8 one with a quality from 0 to 100. On a rasterised page of text the lossless form is half the size of PNG; on a photograph the lossy form is 26ร smaller than the lossless one.
repository ยท pkg.go.dev