Leptonica 1.82.0
Image processing and image analysis suite
pix.h
Go to the documentation of this file.
1/*====================================================================*
2 - Copyright (C) 2001 Leptonica. All rights reserved.
3 -
4 - Redistribution and use in source and binary forms, with or without
5 - modification, are permitted provided that the following conditions
6 - are met:
7 - 1. Redistributions of source code must retain the above copyright
8 - notice, this list of conditions and the following disclaimer.
9 - 2. Redistributions in binary form must reproduce the above
10 - copyright notice, this list of conditions and the following
11 - disclaimer in the documentation and/or other materials
12 - provided with the distribution.
13 -
14 - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15 - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16 - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18 - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23 - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 *====================================================================*/
26
27#ifndef LEPTONICA_PIX_H
28#define LEPTONICA_PIX_H
29
131/*-------------------------------------------------------------------------*
132 * Basic Pix *
133 *-------------------------------------------------------------------------*/
134 /* The 'special' field is by default 0, but it can hold integers
135 * that direct non-default actions, e.g., in png and jpeg I/O. */
136
138struct Pix
139{
140 l_uint32 w;
141 l_uint32 h;
142 l_uint32 d;
143 l_uint32 spp;
144 l_uint32 wpl;
145 l_uint32 refcount;
146 l_int32 xres;
148 l_int32 yres;
150 l_int32 informat;
151 l_int32 special;
152 char *text;
154 l_uint32 *data;
155};
156typedef struct Pix PIX;
157
160{
161 void *array;
162 l_int32 depth;
163 l_int32 nalloc;
164 l_int32 n;
165};
166typedef struct PixColormap PIXCMAP;
167
168
174{
175 l_uint8 blue;
176 l_uint8 green;
177 l_uint8 red;
178 l_uint8 alpha;
179};
180typedef struct RGBA_Quad RGBA_QUAD;
181
182
183/*-------------------------------------------------------------------------*
184 * Colors for 32 RGBA *
185 *-------------------------------------------------------------------------*/
186/* <pre>
187 * Notes:
188 * (1) These are the byte indices for colors in 32 bpp images.
189 * They are used through the GET/SET_DATA_BYTE accessors.
190 * The 4th byte, typically known as the "alpha channel" and used
191 * for blending, is used to a small extent in leptonica.
192 * (2) Do not change these values! If you redefine them, functions
193 * that have the shifts hardcoded for efficiency and conciseness
194 * (instead of using the constants below) will break. These
195 * functions are labelled with "***" next to their names at
196 * the top of the files in which they are defined.
197 * (3) The shifts to extract the red, green, blue and alpha components
198 * from a 32 bit pixel are defined here.
199 * </pre>
200 */
201
203enum {
207 L_ALPHA_CHANNEL = 3
209
210static const l_int32 L_RED_SHIFT =
211 8 * (sizeof(l_uint32) - 1 - COLOR_RED); /* 24 */
212static const l_int32 L_GREEN_SHIFT =
213 8 * (sizeof(l_uint32) - 1 - COLOR_GREEN); /* 16 */
214static const l_int32 L_BLUE_SHIFT =
215 8 * (sizeof(l_uint32) - 1 - COLOR_BLUE); /* 8 */
216static const l_int32 L_ALPHA_SHIFT =
217 8 * (sizeof(l_uint32) - 1 - L_ALPHA_CHANNEL); /* 0 */
218
219
220/*-------------------------------------------------------------------------*
221 * Colors for drawing boxes *
222 *-------------------------------------------------------------------------*/
224enum {
230 L_DRAW_RANDOM = 5
232
233
234/*-------------------------------------------------------------------------*
235 * Perceptual color weights *
236 *-------------------------------------------------------------------------*/
237/* <pre>
238 * Notes:
239 * (1) These perceptual weighting factors are ad-hoc, but they do
240 * add up to 1. Unlike, for example, the weighting factors for
241 * converting RGB to luminance, or more specifically to Y in the
242 * YUV colorspace. Those numbers come from the
243 * International Telecommunications Union, via ITU-R.
244 * </pre>
245 */
246static const l_float32 L_RED_WEIGHT = 0.3f;
247static const l_float32 L_GREEN_WEIGHT = 0.5f;
248static const l_float32 L_BLUE_WEIGHT = 0.2f;
251/*-------------------------------------------------------------------------*
252 * Flags for colormap conversion *
253 *-------------------------------------------------------------------------*/
255enum {
262
263
264/*------------------------------------------------------------------------*
265 *!
266 * <pre>
267 * The following operation bit flags have been modified from
268 * Sun's pixrect.h.
269 *
270 * The 'op' in 'rasterop' is represented by an integer
271 * composed with Boolean functions using the set of five integers
272 * given below. The integers, and the op codes resulting from
273 * boolean expressions on them, need only be in the range from 0 to 15.
274 * The function is applied on a per-pixel basis.
275 *
276 * Examples: the op code representing ORing the src and dest
277 * is computed using the bit OR, as PIX_SRC | PIX_DST; the op
278 * code representing XORing src and dest is found from
279 * PIX_SRC ^ PIX_DST; the op code representing ANDing src and dest
280 * is found from PIX_SRC & PIX_DST. Note that
281 * PIX_NOT(PIX_CLR) = PIX_SET, and v.v., as they must be.
282 *
283 * We use the following set of definitions:
284 *
285 * #define PIX_SRC 0xc
286 * #define PIX_DST 0xa
287 * #define PIX_NOT(op) (op) ^ 0xf
288 * #define PIX_CLR 0x0
289 * #define PIX_SET 0xf
290 *
291 * These definitions differ from Sun's, in that Sun left-shifted
292 * each value by 1 pixel, and used the least significant bit as a
293 * flag for the "pseudo-operation" of clipping. We don't need
294 * this bit, because it is both efficient and safe ALWAYS to clip
295 * the rectangles to the src and dest images, which is what we do.
296 * See the notes in rop.h on the general choice of these bit flags.
297 *
298 * [If for some reason you need compatibility with Sun's xview package,
299 * you can adopt the original Sun definitions to avoid redefinition conflicts:
300 *
301 * #define PIX_SRC (0xc << 1)
302 * #define PIX_DST (0xa << 1)
303 * #define PIX_NOT(op) ((op) ^ 0x1e)
304 * #define PIX_CLR (0x0 << 1)
305 * #define PIX_SET (0xf << 1)
306 * ]
307 *
308 * We have, for reference, the following 16 unique op flags:
309 *
310 * PIX_CLR 0000 0x0
311 * PIX_SET 1111 0xf
312 * PIX_SRC 1100 0xc
313 * PIX_DST 1010 0xa
314 * PIX_NOT(PIX_SRC) 0011 0x3
315 * PIX_NOT(PIX_DST) 0101 0x5
316 * PIX_SRC | PIX_DST 1110 0xe
317 * PIX_SRC & PIX_DST 1000 0x8
318 * PIX_SRC ^ PIX_DST 0110 0x6
319 * PIX_NOT(PIX_SRC) | PIX_DST 1011 0xb
320 * PIX_NOT(PIX_SRC) & PIX_DST 0010 0x2
321 * PIX_SRC | PIX_NOT(PIX_DST) 1101 0xd
322 * PIX_SRC & PIX_NOT(PIX_DST) 0100 0x4
323 * PIX_NOT(PIX_SRC | PIX_DST) 0001 0x1
324 * PIX_NOT(PIX_SRC & PIX_DST) 0111 0x7
325 * PIX_NOT(PIX_SRC ^ PIX_DST) 1001 0x9
326 *
327 * </pre>
328 *-------------------------------------------------------------------------*/
329
330#define PIX_SRC (0xc)
331#define PIX_DST (0xa)
332#define PIX_NOT(op) ((op) ^ 0x0f)
333#define PIX_CLR (0x0)
334#define PIX_SET (0xf)
336#define PIX_PAINT (PIX_SRC | PIX_DST)
337#define PIX_MASK (PIX_SRC & PIX_DST)
338#define PIX_SUBTRACT (PIX_DST & PIX_NOT(PIX_SRC))
340#define PIX_XOR (PIX_SRC ^ PIX_DST)
343/*-------------------------------------------------------------------------*
344 * <pre>
345 * Important Notes:
346 *
347 * (1) The image data is stored in a single contiguous
348 * array of l_uint32, into which the pixels are packed.
349 * By "packed" we mean that there are no unused bits
350 * between pixels, except for end-of-line padding to
351 * satisfy item (2) below.
352 *
353 * (2) Every image raster line begins on a 32-bit word
354 * boundary within this array.
355 *
356 * (3) Pix image data is stored in 32-bit units, with the
357 * pixels ordered from left to right in the image being
358 * stored in order from the MSB to LSB within the word,
359 * for both big-endian and little-endian machines.
360 * This is the natural ordering for big-endian machines,
361 * as successive bytes are stored and fetched progressively
362 * to the right. However, for little-endians, when storing
363 * we re-order the bytes from this byte stream order, and
364 * reshuffle again for byte access on 32-bit entities.
365 * So if the bytes come in sequence from left to right, we
366 * store them on little-endians in byte order:
367 * 3 2 1 0 7 6 5 4 ...
368 * This MSB to LSB ordering allows left and right shift
369 * operations on 32 bit words to move the pixels properly.
370 *
371 * (4) We use 32 bit pixels for both RGB and RGBA color images.
372 * The A (alpha) byte is ignored in most leptonica functions
373 * operating on color images. Within each 4 byte pixel, the
374 * color samples are ordered from MSB to LSB, as follows:
375 *
376 * | MSB | 2nd MSB | 3rd MSB | LSB |
377 * red green blue alpha
378 * 0 1 2 3 (big-endian)
379 * 3 2 1 0 (little-endian)
380 *
381 * Because we use MSB to LSB ordering within the 32-bit word,
382 * the individual 8-bit samples can be accessed with
383 * GET_DATA_BYTE and SET_DATA_BYTE macros, using the
384 * (implicitly big-ending) ordering
385 * red: byte 0 (MSB)
386 * green: byte 1 (2nd MSB)
387 * blue: byte 2 (3rd MSB)
388 * alpha: byte 3 (LSB)
389 *
390 * The specific color assignment is made in this file,
391 * through the definitions of COLOR_RED, etc. Then the R, G
392 * B and A sample values can be retrieved using
393 * redval = GET_DATA_BYTE(&pixel, COLOR_RED);
394 * greenval = GET_DATA_BYTE(&pixel, COLOR_GREEN);
395 * blueval = GET_DATA_BYTE(&pixel, COLOR_BLUE);
396 * alphaval = GET_DATA_BYTE(&pixel, L_ALPHA_CHANNEL);
397 * and they can be set with
398 * SET_DATA_BYTE(&pixel, COLOR_RED, redval);
399 * SET_DATA_BYTE(&pixel, COLOR_GREEN, greenval);
400 * SET_DATA_BYTE(&pixel, COLOR_BLUE, blueval);
401 * SET_DATA_BYTE(&pixel, L_ALPHA_CHANNEL, alphaval);
402 *
403 * More efficiently, these components can be extracted directly
404 * by shifting and masking, explicitly using the values in
405 * L_RED_SHIFT, etc.:
406 * (pixel32 >> L_RED_SHIFT) & 0xff; (red)
407 * (pixel32 >> L_GREEN_SHIFT) & 0xff; (green)
408 * (pixel32 >> L_BLUE_SHIFT) & 0xff; (blue)
409 * (pixel32 >> L_ALPHA_SHIFT) & 0xff; (alpha)
410 * The functions extractRGBValues() and extractRGBAValues() are
411 * provided to do this. Likewise, the pixels can be set
412 * directly by shifting, using composeRGBPixel() and
413 * composeRGBAPixel().
414 *
415 * All these operations work properly on both big- and little-endians.
416 *
417 * (5) A reference count is held within each pix, giving the
418 * number of ptrs to the pix. When a pixClone() call
419 * is made, the ref count is increased by 1, and
420 * when a pixDestroy() call is made, the reference count
421 * of the pix is decremented. The pix is only destroyed
422 * when the reference count goes to zero.
423 *
424 * (6) The version numbers (below) are used in the serialization
425 * of these data structures. They are placed in the files,
426 * and rarely (if ever) change.
427 *
428 * (7) The serialization dependencies are as follows:
429 * pixaa : pixa : boxa
430 * boxaa : boxa
431 * So, for example, pixaa and boxaa can be changed without
432 * forcing a change in pixa or boxa. However, if pixa is
433 * changed, it forces a change in pixaa, and if boxa is
434 * changed, if forces a change in the other three.
435 * We define four version numbers:
436 * PIXAA_VERSION_NUMBER
437 * PIXA_VERSION_NUMBER
438 * BOXAA_VERSION_NUMBER
439 * BOXA_VERSION_NUMBER
440 * </pre>
441 *-------------------------------------------------------------------------*/
442
443
444
445/*-------------------------------------------------------------------------*
446 * Array of pix *
447 *-------------------------------------------------------------------------*/
448 /* Serialization for primary data structures */
449#define PIXAA_VERSION_NUMBER 2
450#define PIXA_VERSION_NUMBER 2
451#define BOXA_VERSION_NUMBER 2
452#define BOXAA_VERSION_NUMBER 3
455struct Pixa
456{
457 l_int32 n;
458 l_int32 nalloc;
459 l_uint32 refcount;
460 struct Pix **pix;
461 struct Boxa *boxa;
462};
463typedef struct Pixa PIXA;
464
466struct Pixaa
467{
468 l_int32 n;
469 l_int32 nalloc;
470 struct Pixa **pixa;
471 struct Boxa *boxa;
472};
473typedef struct Pixaa PIXAA;
474
475
476/*-------------------------------------------------------------------------*
477 * Basic rectangle and rectangle arrays *
478 *-------------------------------------------------------------------------*/
480struct Box
481{
482 l_int32 x;
483 l_int32 y;
484 l_int32 w;
485 l_int32 h;
486 l_uint32 refcount;
487};
488typedef struct Box BOX;
489
491struct Boxa
492{
493 l_int32 n;
494 l_int32 nalloc;
495 l_uint32 refcount;
496 struct Box **box;
497};
498typedef struct Boxa BOXA;
499
501struct Boxaa
502{
503 l_int32 n;
504 l_int32 nalloc;
505 struct Boxa **boxa;
506};
507typedef struct Boxaa BOXAA;
508
509
510/*-------------------------------------------------------------------------*
511 * Array of points *
512 *-------------------------------------------------------------------------*/
513#define PTA_VERSION_NUMBER 1
516struct Pta
517{
518 l_int32 n;
519 l_int32 nalloc;
520 l_uint32 refcount;
521 l_float32 *x, *y;
522};
523typedef struct Pta PTA;
524
525
526/*-------------------------------------------------------------------------*
527 * Array of Pta *
528 *-------------------------------------------------------------------------*/
530struct Ptaa
531{
532 l_int32 n;
533 l_int32 nalloc;
534 struct Pta **pta;
535};
536typedef struct Ptaa PTAA;
537
538
539/*-------------------------------------------------------------------------*
540 * Pix accumulator container *
541 *-------------------------------------------------------------------------*/
543struct Pixacc
544{
545 l_int32 w;
546 l_int32 h;
547 l_int32 offset;
549 struct Pix *pix;
550};
551typedef struct Pixacc PIXACC;
552
553
554/*-------------------------------------------------------------------------*
555 * Pix tiling *
556 *-------------------------------------------------------------------------*/
559{
560 struct Pix *pix;
561 l_int32 nx;
562 l_int32 ny;
563 l_int32 w;
564 l_int32 h;
565 l_int32 xoverlap;
566 l_int32 yoverlap;
567 l_int32 strip;
568};
569typedef struct PixTiling PIXTILING;
570
571
572/*-------------------------------------------------------------------------*
573 * FPix: pix with float array *
574 *-------------------------------------------------------------------------*/
575#define FPIX_VERSION_NUMBER 2
578struct FPix
579{
580 l_int32 w;
581 l_int32 h;
582 l_int32 wpl;
583 l_uint32 refcount;
584 l_int32 xres;
586 l_int32 yres;
588 l_float32 *data;
589};
590typedef struct FPix FPIX;
591
593struct FPixa
594{
595 l_int32 n;
596 l_int32 nalloc;
597 l_uint32 refcount;
598 struct FPix **fpix;
599};
600typedef struct FPixa FPIXA;
601
602
603/*-------------------------------------------------------------------------*
604 * DPix: pix with double array *
605 *-------------------------------------------------------------------------*/
606#define DPIX_VERSION_NUMBER 2
609struct DPix
610{
611 l_int32 w;
612 l_int32 h;
613 l_int32 wpl;
614 l_uint32 refcount;
615 l_int32 xres;
617 l_int32 yres;
619 l_float64 *data;
620};
621typedef struct DPix DPIX;
622
623
624/*-------------------------------------------------------------------------*
625 * PixComp: compressed pix *
626 *-------------------------------------------------------------------------*/
629{
630 l_int32 w;
631 l_int32 h;
632 l_int32 d;
633 l_int32 xres;
635 l_int32 yres;
637 l_int32 comptype;
639 char *text;
640 l_int32 cmapflag;
641 l_uint8 *data;
642 size_t size;
643};
644typedef struct PixComp PIXC;
645
646
647/*-------------------------------------------------------------------------*
648 * PixaComp: array of compressed pix *
649 *-------------------------------------------------------------------------*/
650#define PIXACOMP_VERSION_NUMBER 2
654{
655 l_int32 n;
656 l_int32 nalloc;
657 l_int32 offset;
658 struct PixComp **pixc;
659 struct Boxa *boxa;
660};
661typedef struct PixaComp PIXAC;
662
663
664/*-------------------------------------------------------------------------*
665 * Access and storage flags *
666 *-------------------------------------------------------------------------*/
667/*
668 * <pre>
669 * For Pix, Box, Pta and Numa, there are 3 standard methods for handling
670 * the retrieval or insertion of a struct:
671 * (1) direct insertion (Don't do this if there is another handle
672 * somewhere to this same struct!)
673 * (2) copy (Always safe, sets up a refcount of 1 on the new object.
674 * Can be undesirable if very large, such as an image or
675 * an array of images.)
676 * (3) clone (Makes another handle to the same struct, and bumps the
677 * refcount up by 1. OK to use except in two situations:
678 * (a) You change data through one of the handles but don't
679 * want those changes to be seen by the other handle.
680 * (b) The application is multi-threaded. Because the clone
681 * operation is not atomic (e.g., locked with a mutex),
682 * it is possible to end up with an incorrect ref count,
683 * causing either a memory leak or a crash.
684 *
685 * For Pixa and Boxa, which are structs that hold an array of clonable
686 * structs, there is an additional method:
687 * (4) copy-clone (Makes a new higher-level struct with a refcount
688 * of 1, but clones all the structs in the array.)
689 *
690 * Unlike the other structs, when retrieving a string from an Sarray,
691 * you are allowed to get a handle without a copy or clone (i.e., the
692 * string is not owned by the handle). You must not either free the string
693 * or insert it in some other struct that would own it. Specifically,
694 * for an Sarray, the copyflag for retrieval is either:
695 * L_COPY or L_NOCOPY
696 * and for insertion, the copyflag is either:
697 * L_COPY or one of {L_INSERT , L_NOCOPY} (the latter are equivalent
698 * for insertion))
699 * Typical patterns are:
700 * (1) Reference a string in an Sarray with L_NOCOPY and insert a copy
701 * of it in another Sarray with L_COPY.
702 * (2) Copy a string from an Sarray with L_COPY and insert it in
703 * another Sarray with L_INSERT (or L_NOCOPY).
704 * In both cases, a copy is made and both Sarrays own their instance
705 * of that string.
706 * </pre>
707 */
709enum {
712 L_COPY = 1,
714 L_COPY_CLONE = 3
717
718/*----------------------------------------------------------------------------*
719 * Sort flags *
720 *----------------------------------------------------------------------------*/
722enum {
724 L_BIN_SORT = 2
726
728enum {
732
734enum {
747
748/*---------------------------------------------------------------------------*
749 * Blend flags *
750 *---------------------------------------------------------------------------*/
752enum {
760
762enum {
764 L_PAINT_DARK = 2
766
767/*-------------------------------------------------------------------------*
768 * Graphics pixel setting *
769 *-------------------------------------------------------------------------*/
771enum {
774 L_FLIP_PIXELS = 3
776
777/*-------------------------------------------------------------------------*
778 * Size and location filter flags *
779 *-------------------------------------------------------------------------*/
781enum {
785 L_SELECT_IF_GTE = 4
787
789enum {
797
799enum {
809
811enum {
814 L_CHECK_BOTH = 3
816
817/*-------------------------------------------------------------------------*
818 * Color component selection flags *
819 *-------------------------------------------------------------------------*/
821enum {
832
833/*-------------------------------------------------------------------------*
834 * Color content flags *
835 *-------------------------------------------------------------------------*/
837enum {
840 L_MAX_DIFF = 3
842
843/*-------------------------------------------------------------------------*
844 * 16-bit conversion flags *
845 *-------------------------------------------------------------------------*/
847enum {
854 L_CLIP_TO_FFFF = 7
856
857/*-------------------------------------------------------------------------*
858 * Rotate and shear flags *
859 *-------------------------------------------------------------------------*/
861enum {
866
868enum {
872
874enum {
878
879/*-------------------------------------------------------------------------*
880 * Affine transform order flags *
881 *-------------------------------------------------------------------------*/
883enum {
889 L_SC_TR_RO = 6
891
892/*-------------------------------------------------------------------------*
893 * Grayscale filling flags *
894 *-------------------------------------------------------------------------*/
896enum {
898 L_FILL_BLACK = 2
900
901/*-------------------------------------------------------------------------*
902 * Flags for setting to white or black *
903 *-------------------------------------------------------------------------*/
905enum {
907 L_SET_BLACK = 2
909
910/*-------------------------------------------------------------------------*
911 * Flags for getting white or black value *
912 *-------------------------------------------------------------------------*/
914enum {
916 L_GET_BLACK_VAL = 2
918
919/*-------------------------------------------------------------------------*
920 * Flags for 8 bit and 16 bit pixel sums *
921 *-------------------------------------------------------------------------*/
923enum {
925 L_BLACK_IS_MAX = 2
927
928/*-------------------------------------------------------------------------*
929 * Dither parameters *
930 * If within this grayscale distance from black or white, *
931 * do not propagate excess or deficit to neighboring pixels. *
932 *-------------------------------------------------------------------------*/
934enum {
940
941/*-------------------------------------------------------------------------*
942 * Distance type flags *
943 *-------------------------------------------------------------------------*/
945enum {
949
950/*-------------------------------------------------------------------------*
951 * Distance Value flags *
952 *-------------------------------------------------------------------------*/
954enum {
959 L_ZERO = 5,
960 L_ALL = 6
962
963/*-------------------------------------------------------------------------*
964 * Statistical measures *
965 *-------------------------------------------------------------------------*/
967enum {
974 L_VARIANCE = 7
976
977/*-------------------------------------------------------------------------*
978 * Set index selection flags *
979 *-------------------------------------------------------------------------*/
981enum {
985
986/*-------------------------------------------------------------------------*
987 * Text orientation flags *
988 *-------------------------------------------------------------------------*/
990enum {
997
998/*-------------------------------------------------------------------------*
999 * Edge orientation flags *
1000 *-------------------------------------------------------------------------*/
1002enum {
1005 L_ALL_EDGES = 2
1007
1008/*-------------------------------------------------------------------------*
1009 * Line orientation flags *
1010 *-------------------------------------------------------------------------*/
1012enum {
1017 L_OBLIQUE_LINE = 4
1019
1020/*-------------------------------------------------------------------------*
1021 * Image orientation flags *
1022 *-------------------------------------------------------------------------*/
1024enum {
1026 L_LANDSCAPE_MODE = 1
1028
1029/*-------------------------------------------------------------------------*
1030 * Scan direction flags *
1031 *-------------------------------------------------------------------------*/
1033enum {
1042 L_SCAN_VERTICAL = 8
1044
1045/*-------------------------------------------------------------------------*
1046 * Box size adjustment and location flags *
1047 *-------------------------------------------------------------------------*/
1049enum {
1066 L_GET_BOT = 16
1068
1069/*-------------------------------------------------------------------------*
1070 * Flags for modifying box boundaries using a second box *
1071 *-------------------------------------------------------------------------*/
1073enum {
1079 L_USE_CAPPED_MAX = 6
1081
1082/*-------------------------------------------------------------------------*
1083 * Handling overlapping bounding boxes in boxa *
1084 *-------------------------------------------------------------------------*/
1086enum {
1088 L_REMOVE_SMALL = 2
1090
1091/*-------------------------------------------------------------------------*
1092 * Selecting or making a box from two (intersecting) boxes *
1093 *-------------------------------------------------------------------------*/
1095enum {
1099 L_SMALLEST_AREA = 4
1101
1102/*-------------------------------------------------------------------------*
1103 * Flags for replacing invalid boxes *
1104 *-------------------------------------------------------------------------*/
1106enum {
1110
1111/*-------------------------------------------------------------------------*
1112 * Flags for box corners and center *
1113 *-------------------------------------------------------------------------*/
1115enum {
1120 L_BOX_CENTER = 5
1122
1123/*-------------------------------------------------------------------------*
1124 * Horizontal warp *
1125 *-------------------------------------------------------------------------*/
1127enum {
1129 L_WARP_TO_RIGHT = 2
1131
1133enum {
1135 L_QUADRATIC_WARP = 2
1137
1138/*-------------------------------------------------------------------------*
1139 * Pixel selection for resampling *
1140 *-------------------------------------------------------------------------*/
1142enum {
1144 L_SAMPLED = 2
1146
1147/*-------------------------------------------------------------------------*
1148 * Thinning flags *
1149 *-------------------------------------------------------------------------*/
1151enum {
1153 L_THIN_BG = 2
1155
1156/*-------------------------------------------------------------------------*
1157 * Runlength flags *
1158 *-------------------------------------------------------------------------*/
1160enum {
1162 L_VERTICAL_RUNS = 1
1164
1165/*-------------------------------------------------------------------------*
1166 * Edge filter flags *
1167 *-------------------------------------------------------------------------*/
1169enum {
1171 L_TWO_SIDED_EDGE = 2
1173
1174/*-------------------------------------------------------------------------*
1175 * Subpixel color component ordering in LCD display *
1176 *-------------------------------------------------------------------------*/
1178enum {
1184
1185/*-------------------------------------------------------------------------*
1186 * HSV histogram flags *
1187 *-------------------------------------------------------------------------*/
1189enum {
1192 L_SV_HISTO = 3
1194
1195/*-------------------------------------------------------------------------*
1196 * HSV Region flags (inclusion, exclusion) *
1197 *-------------------------------------------------------------------------*/
1199enum {
1201 L_EXCLUDE_REGION = 2
1203
1204/*-------------------------------------------------------------------------*
1205 * Location flags for adding text to a pix *
1206 *-------------------------------------------------------------------------*/
1208enum {
1216 L_ADD_AT_RIGHT = 8
1218
1219/*-------------------------------------------------------------------------*
1220 * Flags for plotting on a pix *
1221 *-------------------------------------------------------------------------*/
1223enum {
1229 L_PLOT_AT_RIGHT = 6
1231
1232/*-------------------------------------------------------------------------*
1233 * Flags for making simple masks *
1234 *-------------------------------------------------------------------------*/
1236enum {
1238 L_USE_OUTER = 2
1240
1241/*-------------------------------------------------------------------------*
1242 * Flags for selecting display program *
1243 *-------------------------------------------------------------------------*/
1245enum {
1252
1253/*-------------------------------------------------------------------------*
1254 * Flag(s) used in the 'special' pix field for non-default operations *
1255 * - 0 is default for chroma sampling in jpeg *
1256 * - 10-19 are used for zlib compression in png write *
1257 * - 4 and 8 are used for specifying connectivity in labelling *
1258 *-------------------------------------------------------------------------*/
1260enum {
1263
1264/*-------------------------------------------------------------------------*
1265 * Handling negative values in conversion to unsigned int *
1266 *-------------------------------------------------------------------------*/
1268enum {
1270 L_TAKE_ABSVAL = 2
1272
1273/*-------------------------------------------------------------------------*
1274 * Relative to zero flags *
1275 *-------------------------------------------------------------------------*/
1277enum {
1282
1283/*-------------------------------------------------------------------------*
1284 * Flags for adding or removing trailing slash from string *
1285 *-------------------------------------------------------------------------*/
1287enum {
1291
1292/*-------------------------------------------------------------------------*
1293 * Pix allocator and deallocator function types *
1294 *-------------------------------------------------------------------------*/
1296typedef void *(*alloc_fn)(size_t);
1297
1299typedef void (*dealloc_fn)(void *);
1300
1301#endif /* LEPTONICA_PIX_H */
static const l_float32 L_BLUE_WEIGHT
Definition: pix.h:248
@ L_DRAW_RANDOM
Definition: pix.h:230
@ L_DRAW_RED
Definition: pix.h:225
@ L_DRAW_RGB
Definition: pix.h:229
@ L_DRAW_BLUE
Definition: pix.h:227
@ L_DRAW_GREEN
Definition: pix.h:226
@ L_DRAW_SPECIFIED
Definition: pix.h:228
void(* dealloc_fn)(void *)
Definition: pix.h:1299
@ COLOR_BLUE
Definition: pix.h:206
@ COLOR_RED
Definition: pix.h:204
@ L_ALPHA_CHANNEL
Definition: pix.h:207
@ COLOR_GREEN
Definition: pix.h:205
@ L_USE_SAME_PARITY_BOXES
Definition: pix.h:1108
@ L_USE_ALL_BOXES
Definition: pix.h:1107
@ L_SELECT_MAX
Definition: pix.h:826
@ L_SELECT_GREEN
Definition: pix.h:823
@ L_SELECT_SATURATION
Definition: pix.h:829
@ L_SELECT_BLUE
Definition: pix.h:824
@ L_SELECT_AVERAGE
Definition: pix.h:827
@ L_SELECT_MIN
Definition: pix.h:825
@ L_SELECT_HUE
Definition: pix.h:828
@ L_SELECT_WEIGHTED
Definition: pix.h:830
@ L_SELECT_RED
Definition: pix.h:822
@ L_FLIP_PIXELS
Definition: pix.h:774
@ L_SET_PIXELS
Definition: pix.h:772
@ L_CLEAR_PIXELS
Definition: pix.h:773
@ L_HS_HISTO
Definition: pix.h:1190
@ L_SV_HISTO
Definition: pix.h:1192
@ L_HV_HISTO
Definition: pix.h:1191
@ DEFAULT_CLIP_UPPER_2
Definition: pix.h:938
@ DEFAULT_CLIP_LOWER_1
Definition: pix.h:935
@ DEFAULT_CLIP_LOWER_2
Definition: pix.h:937
@ DEFAULT_CLIP_UPPER_1
Definition: pix.h:936
@ L_BLEND_GRAY
Definition: pix.h:756
@ L_BLEND_TO_WHITE
Definition: pix.h:754
@ L_BLEND_WITH_INVERSE
Definition: pix.h:753
@ L_BLEND_TO_BLACK
Definition: pix.h:755
@ L_BLEND_GRAY_WITH_INVERSE
Definition: pix.h:757
@ L_MAX_DIFF
Definition: pix.h:840
@ L_INTERMED_DIFF
Definition: pix.h:838
@ L_AVE_MAX_DIFF_2
Definition: pix.h:839
@ L_SELECT_IF_LTE
Definition: pix.h:784
@ L_SELECT_IF_LT
Definition: pix.h:782
@ L_SELECT_IF_GT
Definition: pix.h:783
@ L_SELECT_IF_GTE
Definition: pix.h:785
@ L_POS_SLOPE_LINE
Definition: pix.h:1014
@ L_HORIZONTAL_LINE
Definition: pix.h:1013
@ L_OBLIQUE_LINE
Definition: pix.h:1017
@ L_NEG_SLOPE_LINE
Definition: pix.h:1016
@ L_VERTICAL_LINE
Definition: pix.h:1015
static const l_float32 L_RED_WEIGHT
Definition: pix.h:246
@ L_SELECT_IF_BOTH
Definition: pix.h:806
@ L_SELECT_IF_EITHER
Definition: pix.h:804
@ L_SELECT_WIDTH
Definition: pix.h:800
@ L_SELECT_XVAL
Definition: pix.h:802
@ L_SELECT_HEIGHT
Definition: pix.h:801
@ L_SELECT_YVAL
Definition: pix.h:803
@ L_USE_INNER
Definition: pix.h:1237
@ L_USE_OUTER
Definition: pix.h:1238
@ L_SORT_BY_AREA
Definition: pix.h:744
@ L_SORT_BY_MIN_DIMENSION
Definition: pix.h:741
@ L_SORT_BY_PERIMETER
Definition: pix.h:743
@ L_SORT_BY_WIDTH
Definition: pix.h:739
@ L_SORT_BY_RIGHT
Definition: pix.h:737
@ L_SORT_BY_BOT
Definition: pix.h:738
@ L_SORT_BY_ASPECT_RATIO
Definition: pix.h:745
@ L_SORT_BY_HEIGHT
Definition: pix.h:740
@ L_SORT_BY_MAX_DIMENSION
Definition: pix.h:742
@ L_SORT_BY_Y
Definition: pix.h:736
@ L_SORT_BY_X
Definition: pix.h:735
@ REMOVE_CMAP_TO_FULL_COLOR
Definition: pix.h:258
@ REMOVE_CMAP_TO_GRAYSCALE
Definition: pix.h:257
@ REMOVE_CMAP_WITH_ALPHA
Definition: pix.h:259
@ REMOVE_CMAP_BASED_ON_SRC
Definition: pix.h:260
@ REMOVE_CMAP_TO_BINARY
Definition: pix.h:256
@ L_ADD_AT_BOT
Definition: pix.h:1214
@ L_ADD_LEFT
Definition: pix.h:1211
@ L_ADD_AT_LEFT
Definition: pix.h:1215
@ L_ADD_BELOW
Definition: pix.h:1210
@ L_ADD_AT_TOP
Definition: pix.h:1213
@ L_ADD_ABOVE
Definition: pix.h:1209
@ L_ADD_RIGHT
Definition: pix.h:1212
@ L_ADD_AT_RIGHT
Definition: pix.h:1216
@ L_COPY
Definition: pix.h:712
@ L_CLONE
Definition: pix.h:713
@ L_COPY_CLONE
Definition: pix.h:714
@ L_NOCOPY
Definition: pix.h:710
@ L_INSERT
Definition: pix.h:711
@ L_PORTRAIT_MODE
Definition: pix.h:1025
@ L_LANDSCAPE_MODE
Definition: pix.h:1026
@ L_UPPER_RIGHT
Definition: pix.h:1117
@ L_LOWER_RIGHT
Definition: pix.h:1119
@ L_UPPER_LEFT
Definition: pix.h:1116
@ L_BOX_CENTER
Definition: pix.h:1120
@ L_LOWER_LEFT
Definition: pix.h:1118
@ L_CHOOSE_CONSECUTIVE
Definition: pix.h:982
@ L_CHOOSE_SKIP_BY
Definition: pix.h:983
@ L_NO_CHROMA_SAMPLING_JPEG
Definition: pix.h:1261
@ L_LINEAR_WARP
Definition: pix.h:1134
@ L_QUADRATIC_WARP
Definition: pix.h:1135
@ L_EXCLUDE_REGION
Definition: pix.h:1201
@ L_INCLUDE_REGION
Definition: pix.h:1200
@ L_PAINT_LIGHT
Definition: pix.h:763
@ L_PAINT_DARK
Definition: pix.h:764
@ L_VERTICAL_RUNS
Definition: pix.h:1162
@ L_HORIZONTAL_RUNS
Definition: pix.h:1161
@ L_TWO_SIDED_EDGE
Definition: pix.h:1171
@ L_SOBEL_EDGE
Definition: pix.h:1170
@ L_SET_WHITE
Definition: pix.h:906
@ L_SET_BLACK
Definition: pix.h:907
@ L_WARP_TO_RIGHT
Definition: pix.h:1129
@ L_WARP_TO_LEFT
Definition: pix.h:1128
@ L_CLIP_TO_FFFF
Definition: pix.h:854
@ L_MS_TWO_BYTES
Definition: pix.h:853
@ L_CLIP_TO_FF
Definition: pix.h:851
@ L_LS_TWO_BYTES
Definition: pix.h:852
@ L_MS_BYTE
Definition: pix.h:849
@ L_AUTO_BYTE
Definition: pix.h:850
@ L_LS_BYTE
Definition: pix.h:848
@ L_ADJUST_CHOOSE_MAX
Definition: pix.h:1058
@ L_SET_RIGHT
Definition: pix.h:1060
@ L_GET_LEFT
Definition: pix.h:1063
@ L_SET_LEFT
Definition: pix.h:1059
@ L_ADJUST_LEFT
Definition: pix.h:1051
@ L_SET_BOT
Definition: pix.h:1062
@ L_ADJUST_LEFT_AND_RIGHT
Definition: pix.h:1053
@ L_ADJUST_RIGHT
Definition: pix.h:1052
@ L_ADJUST_BOT
Definition: pix.h:1055
@ L_GET_RIGHT
Definition: pix.h:1064
@ L_ADJUST_TOP
Definition: pix.h:1054
@ L_ADJUST_SKIP
Definition: pix.h:1050
@ L_SET_TOP
Definition: pix.h:1061
@ L_GET_TOP
Definition: pix.h:1065
@ L_ADJUST_TOP_AND_BOT
Definition: pix.h:1056
@ L_ADJUST_CHOOSE_MIN
Definition: pix.h:1057
@ L_GET_BOT
Definition: pix.h:1066
@ L_BLACK_IS_MAX
Definition: pix.h:925
@ L_WHITE_IS_MAX
Definition: pix.h:924
@ L_FROM_BOT
Definition: pix.h:1037
@ L_FROM_LEFT
Definition: pix.h:1034
@ L_SCAN_NEGATIVE
Definition: pix.h:1038
@ L_SCAN_VERTICAL
Definition: pix.h:1042
@ L_SCAN_BOTH
Definition: pix.h:1040
@ L_SCAN_HORIZONTAL
Definition: pix.h:1041
@ L_FROM_RIGHT
Definition: pix.h:1035
@ L_SCAN_POSITIVE
Definition: pix.h:1039
@ L_FROM_TOP
Definition: pix.h:1036
@ L_ADD_TRAIL_SLASH
Definition: pix.h:1288
@ L_REMOVE_TRAIL_SLASH
Definition: pix.h:1289
@ L_BIN_SORT
Definition: pix.h:724
@ L_SHELL_SORT
Definition: pix.h:723
@ L_REMOVE_SMALL
Definition: pix.h:1088
@ L_COMBINE
Definition: pix.h:1087
@ L_TEXT_ORIENT_DOWN
Definition: pix.h:994
@ L_TEXT_ORIENT_UP
Definition: pix.h:992
@ L_TEXT_ORIENT_LEFT
Definition: pix.h:993
@ L_TEXT_ORIENT_RIGHT
Definition: pix.h:995
@ L_TEXT_ORIENT_UNKNOWN
Definition: pix.h:991
@ L_PLOT_AT_BOT
Definition: pix.h:1226
@ L_PLOT_AT_LEFT
Definition: pix.h:1227
@ L_PLOT_AT_MID_VERT
Definition: pix.h:1228
@ L_PLOT_AT_MID_HORIZ
Definition: pix.h:1225
@ L_PLOT_AT_TOP
Definition: pix.h:1224
@ L_PLOT_AT_RIGHT
Definition: pix.h:1229
@ L_DISPLAY_WITH_XV
Definition: pix.h:1248
@ L_DISPLAY_WITH_XZGV
Definition: pix.h:1246
@ L_DISPLAY_WITH_XLI
Definition: pix.h:1247
@ L_DISPLAY_WITH_OPEN
Definition: pix.h:1250
@ L_DISPLAY_WITH_IV
Definition: pix.h:1249
@ L_INTERPOLATED
Definition: pix.h:1143
@ L_SAMPLED
Definition: pix.h:1144
@ L_CLIP_TO_ZERO
Definition: pix.h:1269
@ L_TAKE_ABSVAL
Definition: pix.h:1270
@ L_SORT_DECREASING
Definition: pix.h:730
@ L_SORT_INCREASING
Definition: pix.h:729
@ L_SUBPIXEL_ORDER_VRGB
Definition: pix.h:1181
@ L_SUBPIXEL_ORDER_BGR
Definition: pix.h:1180
@ L_SUBPIXEL_ORDER_RGB
Definition: pix.h:1179
@ L_SUBPIXEL_ORDER_VBGR
Definition: pix.h:1182
@ L_CHECK_BOTH
Definition: pix.h:814
@ L_CHECK_WIDTH
Definition: pix.h:812
@ L_CHECK_HEIGHT
Definition: pix.h:813
@ L_EUCLIDEAN_DISTANCE
Definition: pix.h:947
@ L_MANHATTAN_DISTANCE
Definition: pix.h:946
@ L_THIN_BG
Definition: pix.h:1153
@ L_THIN_FG
Definition: pix.h:1152
@ L_USE_MINSIZE
Definition: pix.h:1074
@ L_SUB_ON_LOC_DIFF
Definition: pix.h:1076
@ L_USE_CAPPED_MIN
Definition: pix.h:1078
@ L_USE_CAPPED_MAX
Definition: pix.h:1079
@ L_USE_MAXSIZE
Definition: pix.h:1075
@ L_SUB_ON_SIZE_DIFF
Definition: pix.h:1077
@ L_EQUAL_TO_ZERO
Definition: pix.h:1279
@ L_LESS_THAN_ZERO
Definition: pix.h:1278
@ L_GREATER_THAN_ZERO
Definition: pix.h:1280
@ L_MODE_VAL
Definition: pix.h:970
@ L_ROOT_MEAN_SQUARE
Definition: pix.h:972
@ L_MODE_COUNT
Definition: pix.h:971
@ L_MEAN_ABSVAL
Definition: pix.h:968
@ L_VARIANCE
Definition: pix.h:974
@ L_STANDARD_DEVIATION
Definition: pix.h:973
@ L_MEDIAN_VAL
Definition: pix.h:969
@ L_BRING_IN_BLACK
Definition: pix.h:870
@ L_BRING_IN_WHITE
Definition: pix.h:869
@ L_GEOMETRIC_UNION
Definition: pix.h:1096
@ L_SMALLEST_AREA
Definition: pix.h:1099
@ L_LARGEST_AREA
Definition: pix.h:1098
@ L_GEOMETRIC_INTERSECTION
Definition: pix.h:1097
@ L_GET_BLACK_VAL
Definition: pix.h:916
@ L_GET_WHITE_VAL
Definition: pix.h:915
@ L_ROTATE_SAMPLING
Definition: pix.h:864
@ L_ROTATE_SHEAR
Definition: pix.h:863
@ L_ROTATE_AREA_MAP
Definition: pix.h:862
@ L_SHEAR_ABOUT_CORNER
Definition: pix.h:875
@ L_SHEAR_ABOUT_CENTER
Definition: pix.h:876
@ L_ALL_EDGES
Definition: pix.h:1005
@ L_VERTICAL_EDGES
Definition: pix.h:1004
@ L_HORIZONTAL_EDGES
Definition: pix.h:1003
static const l_float32 L_GREEN_WEIGHT
Definition: pix.h:247
@ L_SELECT_BY_HEIGHT
Definition: pix.h:791
@ L_SELECT_BY_AREA
Definition: pix.h:794
@ L_SELECT_BY_PERIMETER
Definition: pix.h:795
@ L_SELECT_BY_WIDTH
Definition: pix.h:790
@ L_SELECT_BY_MAX_DIMENSION
Definition: pix.h:792
@ L_NON_NEGATIVE
Definition: pix.h:956
@ L_ZERO
Definition: pix.h:959
@ L_NEGATIVE
Definition: pix.h:955
@ L_ALL
Definition: pix.h:960
@ L_POSITIVE
Definition: pix.h:957
@ L_NON_POSITIVE
Definition: pix.h:958
@ L_RO_TR_SC
Definition: pix.h:886
@ L_TR_RO_SC
Definition: pix.h:887
@ L_SC_RO_TR
Definition: pix.h:885
@ L_TR_SC_RO
Definition: pix.h:884
@ L_SC_TR_RO
Definition: pix.h:889
@ L_RO_SC_TR
Definition: pix.h:888
@ L_FILL_WHITE
Definition: pix.h:897
@ L_FILL_BLACK
Definition: pix.h:898
Definition: pix.h:481
l_uint32 refcount
Definition: pix.h:486
l_int32 y
Definition: pix.h:483
l_int32 x
Definition: pix.h:482
l_int32 w
Definition: pix.h:484
l_int32 h
Definition: pix.h:485
Definition: pix.h:492
l_int32 nalloc
Definition: pix.h:494
l_uint32 refcount
Definition: pix.h:495
l_int32 n
Definition: pix.h:493
struct Box ** box
Definition: pix.h:496
Definition: pix.h:502
l_int32 nalloc
Definition: pix.h:504
struct Boxa ** boxa
Definition: pix.h:505
l_int32 n
Definition: pix.h:503
Definition: pix.h:610
l_int32 h
Definition: pix.h:612
l_int32 yres
Definition: pix.h:617
l_float64 * data
Definition: pix.h:619
l_int32 w
Definition: pix.h:611
l_uint32 refcount
Definition: pix.h:614
l_int32 xres
Definition: pix.h:615
l_int32 wpl
Definition: pix.h:613
Definition: pix.h:579
l_int32 w
Definition: pix.h:580
l_int32 wpl
Definition: pix.h:582
l_int32 xres
Definition: pix.h:584
l_uint32 refcount
Definition: pix.h:583
l_int32 h
Definition: pix.h:581
l_float32 * data
Definition: pix.h:588
l_int32 yres
Definition: pix.h:586
Definition: pix.h:594
l_int32 nalloc
Definition: pix.h:596
struct FPix ** fpix
Definition: pix.h:598
l_int32 n
Definition: pix.h:595
l_uint32 refcount
Definition: pix.h:597
void * array
Definition: pix.h:161
l_int32 n
Definition: pix.h:164
l_int32 depth
Definition: pix.h:162
l_int32 nalloc
Definition: pix.h:163
Definition: pix.h:629
l_int32 w
Definition: pix.h:630
size_t size
Definition: pix.h:642
l_uint8 * data
Definition: pix.h:641
l_int32 cmapflag
Definition: pix.h:640
l_int32 xres
Definition: pix.h:633
char * text
Definition: pix.h:639
l_int32 yres
Definition: pix.h:635
l_int32 d
Definition: pix.h:632
l_int32 h
Definition: pix.h:631
l_int32 comptype
Definition: pix.h:637
Definition: pix.h:559
l_int32 yoverlap
Definition: pix.h:566
l_int32 nx
Definition: pix.h:561
l_int32 w
Definition: pix.h:563
l_int32 xoverlap
Definition: pix.h:565
struct Pix * pix
Definition: pix.h:560
l_int32 h
Definition: pix.h:564
l_int32 strip
Definition: pix.h:567
l_int32 ny
Definition: pix.h:562
Definition: pix.h:139
l_uint32 d
Definition: pix.h:142
l_uint32 * data
Definition: pix.h:154
l_uint32 spp
Definition: pix.h:143
struct PixColormap * colormap
Definition: pix.h:153
l_uint32 wpl
Definition: pix.h:144
l_uint32 w
Definition: pix.h:140
l_uint32 refcount
Definition: pix.h:145
l_int32 xres
Definition: pix.h:146
l_uint32 h
Definition: pix.h:141
l_int32 yres
Definition: pix.h:148
char * text
Definition: pix.h:152
l_int32 special
Definition: pix.h:151
l_int32 informat
Definition: pix.h:150
Definition: pix.h:654
l_int32 offset
Definition: pix.h:657
l_int32 nalloc
Definition: pix.h:656
l_int32 n
Definition: pix.h:655
struct PixComp ** pixc
Definition: pix.h:658
struct Boxa * boxa
Definition: pix.h:659
Definition: pix.h:456
struct Pix ** pix
Definition: pix.h:460
struct Boxa * boxa
Definition: pix.h:461
l_uint32 refcount
Definition: pix.h:459
l_int32 nalloc
Definition: pix.h:458
l_int32 n
Definition: pix.h:457
Definition: pix.h:467
l_int32 nalloc
Definition: pix.h:469
l_int32 n
Definition: pix.h:468
struct Pixa ** pixa
Definition: pix.h:470
struct Boxa * boxa
Definition: pix.h:471
Definition: pix.h:544
l_int32 offset
Definition: pix.h:547
l_int32 h
Definition: pix.h:546
l_int32 w
Definition: pix.h:545
struct Pix * pix
Definition: pix.h:549
Definition: pix.h:517
l_int32 nalloc
Definition: pix.h:519
l_int32 n
Definition: pix.h:518
l_float32 * y
Definition: pix.h:521
l_uint32 refcount
Definition: pix.h:520
Definition: pix.h:531
struct Pta ** pta
Definition: pix.h:534
l_int32 n
Definition: pix.h:532
l_int32 nalloc
Definition: pix.h:533
Definition: pix.h:174
l_uint8 alpha
Definition: pix.h:178
l_uint8 green
Definition: pix.h:176
l_uint8 blue
Definition: pix.h:175
l_uint8 red
Definition: pix.h:177