From 3a7dcdd2696ed7b85f892f951b0801e382b81778 Mon Sep 17 00:00:00 2001 From: Fabian Giesen Date: Thu, 1 Jul 2021 17:18:51 -0700 Subject: [PATCH] stb_image: Better docs for stbi_info. Fixes #1026. --- stb_image.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/stb_image.h b/stb_image.h index 0a8622b..f59d773 100644 --- a/stb_image.h +++ b/stb_image.h @@ -1,4 +1,4 @@ -/* stb_image - v2.26 - public domain image loader - http://nothings.org/stb +/* stb_image - v2.27 - public domain image loader - http://nothings.org/stb no warranty implied; use at your own risk Do this: @@ -48,6 +48,7 @@ LICENSE RECENT REVISION HISTORY: + 2.27 ( ) document stbi_info better 2.26 (2020-07-13) many minor fixes 2.25 (2020-02-02) fix warnings 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically @@ -176,6 +177,14 @@ RECENT REVISION HISTORY: // // Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. // +// To query the width, height and component count of an image without having to +// decode the full file, you can use the stbi_info family of functions: +// +// int x,y,n,ok; +// ok = stbi_info(filename, &x, &y, &n); +// // returns ok=1 and sets x, y, n if image is a supported format, +// // 0 otherwise. +// // =========================================================================== // // UNICODE: