mirror of
https://github.com/nothings/stb
synced 2025-01-05 22:34:23 +03:00
Merge branch 'fix-issue-466' of https://github.com/rygorous/stb into dev
This commit is contained in:
commit
fedf03e774
21
stb_image.h
21
stb_image.h
@ -135,11 +135,12 @@ RECENT REVISION HISTORY:
|
|||||||
// with each pixel consisting of N interleaved 8-bit components; the first
|
// with each pixel consisting of N interleaved 8-bit components; the first
|
||||||
// pixel pointed to is top-left-most in the image. There is no padding between
|
// pixel pointed to is top-left-most in the image. There is no padding between
|
||||||
// image scanlines or between pixels, regardless of format. The number of
|
// image scanlines or between pixels, regardless of format. The number of
|
||||||
// components N is 'req_comp' if req_comp is non-zero, or *comp otherwise.
|
// components N is 'desired_channels' if desired_channels is non-zero, or
|
||||||
// If req_comp is non-zero, *comp has the number of components that _would_
|
// *channels_in_file otherwise. If desired_channels is non-zero,
|
||||||
// have been output otherwise. E.g. if you set req_comp to 4, you will always
|
// *channels_in_file has the number of components that _would_ have been
|
||||||
// get RGBA output, but you can check *comp to see if it's trivially opaque
|
// output otherwise. E.g. if you set desired_channels to 4, you will always
|
||||||
// because e.g. there were only 3 channels in the source image.
|
// get RGBA output, but you can check *channels_in_file to see if it's trivially
|
||||||
|
// opaque because e.g. there were only 3 channels in the source image.
|
||||||
//
|
//
|
||||||
// An output image with N components has the following components interleaved
|
// An output image with N components has the following components interleaved
|
||||||
// in this order in each pixel:
|
// in this order in each pixel:
|
||||||
@ -151,10 +152,10 @@ RECENT REVISION HISTORY:
|
|||||||
// 4 red, green, blue, alpha
|
// 4 red, green, blue, alpha
|
||||||
//
|
//
|
||||||
// If image loading fails for any reason, the return value will be NULL,
|
// If image loading fails for any reason, the return value will be NULL,
|
||||||
// and *x, *y, *comp will be unchanged. The function stbi_failure_reason()
|
// and *x, *y, *channels_in_file will be unchanged. The function
|
||||||
// can be queried for an extremely brief, end-user unfriendly explanation
|
// stbi_failure_reason() can be queried for an extremely brief, end-user
|
||||||
// of why the load failed. Define STBI_NO_FAILURE_STRINGS to avoid
|
// unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS
|
||||||
// compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
|
// to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly
|
||||||
// more user-friendly ones.
|
// more user-friendly ones.
|
||||||
//
|
//
|
||||||
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
|
// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized.
|
||||||
@ -311,7 +312,7 @@ RECENT REVISION HISTORY:
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
STBI_default = 0, // only used for req_comp
|
STBI_default = 0, // only used for desired_channels
|
||||||
|
|
||||||
STBI_grey = 1,
|
STBI_grey = 1,
|
||||||
STBI_grey_alpha = 2,
|
STBI_grey_alpha = 2,
|
||||||
|
Loading…
Reference in New Issue
Block a user