![]() Stb_image now supports loading HDR images in general, and currently the Radiance. but 'n' will always be the number that it would have been if you said 0 replace '0' with '1'.'4' to force that many components per pixel x = width, y = height, n = # 8-bit components per pixel. Unsigned char *data = stbi_load(filename, &x, &y, &n, 0) SIMD acceleration on x86/圆4 (SSE2) and ARM (NEON)īasic usage (see HDR discussion below for HDR usage): int x,y,n.decode from memory or through FILE (define STBI_NO_STDIO to remove code).GIF (*desired_channels always reports as 4-channel)Īnimated GIF still needs a proper API, but here's one way to do it.PSD (composited view only, no extra channels, 8/16 bit-per-channel).TGA (not sure what subset, if a subset).PNG 1/2/4/8-bit-per-channel (16 bpc not supported).JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib.Primarily of interest to game developers and other people who can avoid problematic images and only need the trivial interface. Native bindings to stb_image.h from the stb library.
0 Comments
Leave a Reply. |