imagefmt 2.1.2
Image loading/saving. @nogc
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:
imagefmt
Image loader and saver for simple needs with support for custom IO and allocators. Independent of the garbage collector.
Decoders:
- PNG, 8-bit and 16-bit interlaced and paletted (+
tRNS
chunk) - BMP, 8-bit
- TGA, 8-bit non-paletted
- JPEG, baseline
Encoders:
- PNG, 8-bit non-paletted non-interlaced
- BMP, 8-bit RGB RGBA
- TGA, 8-bit
Returned buffers are 8-bit by default, other options are 16-bit and 8/16-bit based on source data. The top-left corner is at (0, 0) by default.
import imagefmt;
IFImage a = read_image("aya.jpg", 3); // convert to rgb
if (a.e) {
printf("*** load error: %s\n", IF_ERROR[a.e].ptr);
return;
}
scope(exit) a.free();
IFInfo info = read_info("vine.tga");
printf("size: %d x %d components: %d\n", info.w, info.h, info.c);
- 2.1.2 released 3 years ago
- tjhann/imagefmt
- BSD-2-clause
- Authors:
- Dependencies:
- none
- Versions:
-
2.1.2 2021-Jun-20 2.1.1 2020-Oct-10 2.1.0 2020-Jun-17 2.0.3 2020-Jan-14 2.0.2 2019-Jul-12 - Download Stats:
-
-
26 downloads today
-
187 downloads this week
-
758 downloads this month
-
21010 downloads total
-
- Score:
- 3.4
- Short URL:
- imagefmt.dub.pm