gamut 0.0.7

image library


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

gamut

gamut is an image decoding/encoding library for D.

It's design is inspired by the FreeImage design, where the Image concept is monomorphic and can do it all.

gamut tries to have the fastest and most memory-conscious image decoders available in pure D code. It is nothrow @nogc @safe for usage in -betterC and in disabled-runtime D.

Decoding

  • PNG: 8-bit and 16-bit, L/LA/RGB/RGBA
  • JPEG: 8-bit, L/RGB/RGBA, baseline and progressive
  • QOI: 8-bit, RGB/RGBA
  • QOIX: 8-bit, L/LA/RGB/RGBA. This is an evolving format, specific to Gamut, that embeds some developments in the QOI family of formats.

Encoding

  • PNG. 8-bit, RGB/RGBA
  • JPEG: 8-bit, greyscale/RGB, baseline
  • QOI: 8-bit, RGB/RGBA
  • QOIX: 8-bit, L/LA/RGB/RGBA
  • DDS: BC7 encoded, 8-bit, RGB/RGBA

Why QOIX?

Our benchmark results:

Codecdecode mppsencode mppsbit-per-pixel
PNG (stb)89.7314.3410.29693
QOI204.70150.4210.35162
QOIX177.5103.358.30963
  • QOIX and QOI generally outperforms PNG in decoding speed and encoding speed.
  • QOIX outperforms QOI in compression efficiency at the cost of speed:
  • because it's based upon qoi2avg, a better QOI variant for RGB and RGBA images
  • because it is followed by LZ4, which removes some of the QOI worst cases.
  • Unlike QOI, QOIX adds support for 8-bit greyscale and greyscale + alpha images, with a "QOI-plane" custom codec.
Dependencies:
intel-intrinsics
Versions:
2.6.1 2024-Apr-24
2.6.0 2024-Apr-21
2.5.0 2024-Jan-28
2.4.0 2024-Jan-21
2.3.3 2023-Dec-28
Show all 40 versions
Download Stats:
  • 16 downloads today

  • 134 downloads this week

  • 486 downloads this month

  • 7860 downloads total

Score:
2.1
Short URL:
gamut.dub.pm