simple-image 0.2.0

Opinionated D wrapper library for stb_image


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:

Simple-Image

A D wrapper library for stb-image and stb-image-write. Example Usage:

import simple_image;

void main(string[] args) {
    auto image = args[1].loadImageRgb();
    enum TILE_WIDTH = 24;
    foreach(y; 0 .. image.height) {
        foreach(x; 0 .. image.width) {
            // Draw blue checkboard on top of image
            if (((x / TILE_WIDTH) ^ (y / TILE_WIDTH)) & 1) continue;
            image.pixel(x, y)[] []= [0, 0, 255];
        }
    }
    image.writeImageRgb(args[2]);
}
Authors:
  • Sahan Fernando
Dependencies:
none
Versions:
0.2.0 2025-Nov-16
Show all 1 versions
Download Stats:
  • 1 downloads today

  • 1 downloads this week

  • 1 downloads this month

  • 1 downloads total

Score:
0.4
Short URL:
simple-image.dub.pm