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]);
}
- 0.2.0 released 17 hours ago
- ccapitalK/simple-image
- MIT
- Copyright © 2024-2025, Sahan Fernando
- Authors:
- Dependencies:
- none
- Versions:
-
Show all 1 versions0.2.0 2025-Nov-16 - 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