*/
} RgbImage;
+typedef unsigned long Rgb;
+
void identify_rgbimage(const RgbImage *base, Rect portion,
char result[MAXIMGIDENT], const char *what);
RgbImage *alloc_rgb_image(int w, int h);
#define RI_PIXEL(ri,x,y) ((ri)->data + ((y)*(ri)->w + (x)) * 3)
+static inline Rgb ri_rgb(const RgbImage *ri, int x, int y) {
+ const unsigned char *rip= RI_PIXEL(ri,x,y);
+ return (rip[0] << 16) |
+ (rip[1] << 8) |
+ (rip[2] );
+}
+
/*----- from structure.c -----*/
void find_structure(const CanonImage *im, int *max_relevant_y_r);
typedef struct {
- unsigned long rgb; /* on screen */
+ Rgb rgb; /* on screen */
char c; /* canonical */
} CanonColourInfo;
#define CANONICALISE_IMAGE(im,w,h, COMPUTE_RGB) do{ \
/* compute_rgb should be a number of statements, or \
* a block, which assigns to \
- * unsigned long rgb; \
+ * Rgb rgb; \
* given the values of \
* int x,y; \
* all of which are anamorphic. Result is stored in im. \