gamut v0.0.7 ask for what you want

Guillaume Piolat first.last at gmail.com
Fri Jul 29 10:59:02 UTC 2022


Using D and images I ended up with a problem.

The problem was that parts of my code wanted to decode just 
specific image metadata, other just pixels. Others were 
interested in 10-bit, and others in this or that format. Finally, 
some were concerned about aligned layout and others just wanted 
"dense" pixels without gap between rows.

The goal of Gamut is to cater to a reasonably large set of needs 
with D and images.

I'll be at Dconf if you want to **ask for your particular use 
case.**
The library is not super usable yet, it's still in the design 
phase.

**Features:**
  - monomorphic image type, as opposed to a templated type, for 
all pixel format types
    The problem is that templated image library ends up taking 
compile-time when used
    at scale. The Image type will also act as "view".
  - loading images: PNG (8-bit and 10-bit) / JPEG (baseline and 
progressive) / QOI
  - writing images: PNG (8-bit) / JPEG (baseline) / BC7 in DDS / 
QOI
  - `nothrow @nogc`, all structs, no exceptions, standalone except 
`intel-intrinsics`.
  - (near future): control over the image layout for easy SIMD 
access. For example, you can
    ask for:
       * 64-bytes aligned row of pixels (for aligned SIMD access),
       * or a border of 2 pixels around the data (for resampling),
       * trailing pixels after each row (for unaligned SIMD 
access),
       * and that each row has a multiple of 4x pixels (for SIMD)
  - API inspired by FreeImage.

Gamut has support for an evolving "QOIX" format that mostly 
improves upon QOI. Can be interesting if you have lots of PNG to 
distribute and want more compression than QOI. In the future I'd 
like to extend QOIX to support 10-bit.

DUB: https://code.dlang.org/packages/gamut
GitHub: https://github.com/AuburnSounds/gamut




More information about the Digitalmars-d-announce mailing list