Skip to content

Commit 5bd64f0

Browse files
yoursunnyaclark4life
authored andcommitted
explain how mode=MB is stored
1 parent 7c0eac1 commit 5bd64f0

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/libImaging/Imaging.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,21 @@ extern "C" {
4242
* LA 4 L, -, -, A
4343
* PA 4 P, -, -, A
4444
* I;16 2 I (16-bit integer, native byte order)
45+
* MB variable
4546
*
4647
* "P" is an 8-bit palette mode, which should be mapped through the
4748
* palette member to get an output image. Check palette->mode to
4849
* find the corresponding "real" mode.
4950
*
51+
* "MB" is an experimental multi-band mode for multi-channel image where each sample is
52+
* more than UINT8. In this mode,
53+
* - im->depth is size of each sample in bits. Valid values are 8, 16, and 32. Currently
54+
* each sample is assumed to be a uint; further refactoring will be needed to support
55+
* int and float.
56+
* - im->type is set to IMAGING_TYPE_MB.
57+
* - Neither im->image8 nor im->image32 is set. All operators must access im->image
58+
* directly.
59+
*
5060
* For information on how to access Imaging objects from your own C
5161
* extensions, see http://www.effbot.org/zone/pil-extending.htm
5262
*/
@@ -75,11 +85,12 @@ typedef struct ImagingPaletteInstance *ImagingPalette;
7585

7686
#define IMAGING_MODE_MB "MB" /* multi-band format */
7787

88+
/* Parameters of various ImagingNew* functions. */
7889
typedef struct {
7990
int xsize;
8091
int ysize;
81-
int depth;
82-
int bands;
92+
int depth; /** MB mode only. */
93+
int bands; /** MB mode only. */
8394
} ImagingNewParams;
8495

8596
typedef struct {

0 commit comments

Comments
 (0)