From: Ian Jackson Date: Sun, 14 Jun 2009 18:17:55 +0000 (+0100) Subject: WIP island determination; rename rawimage etc. to rgbimage X-Git-Tag: 1.9.2~124^2~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=2aaae8ee04d0a6a8ab85751ceb67f222d259eba8 WIP island determination; rename rawimage etc. to rgbimage --- diff --git a/pctb/pages.c b/pctb/pages.c index 8a83759..17ec836 100644 --- a/pctb/pages.c +++ b/pctb/pages.c @@ -39,7 +39,7 @@ CanonImage *page_images[MAX_PAGES]; int npages; -RawImage *page0_rawimage; +RgbImage *page0_rgbimage; char *ocean, *pirate; @@ -365,7 +365,7 @@ static void compute_shift_mask(ShMask *sm, unsigned long ximage_mask) { assert(sm->rshift < LONG_BIT); } -static CanonImage *convert_page(Snapshot *sn, RawImage *ri) { +static CanonImage *convert_page(Snapshot *sn, RgbImage *ri) { ShMask shiftmasks[3]; CanonImage *im; @@ -393,7 +393,7 @@ static CanonImage *convert_page(Snapshot *sn, RawImage *ri) { fputc(sample, screenshot_file); } if (ri) - CANONIMG_ALSO_STORERAW(ri); + CANONIMG_ALSO_STORERGB(ri); }); sysassert(!ferror(screenshot_file)); @@ -458,7 +458,7 @@ void take_one_screenshot(void) { raise_and_get_details(); sync_after_input(); wait_for_stability(¤t,0,0, "taking screenshot..."); - //page0_rawimage= alloc_raw_image(sn->width, sn->height); + //page0_rgbimage= alloc_rgb_image(sn->width, sn->height); page_images[0]= convert_page(current, 0); npages= 1; progress_log("collected single screenshot."); diff --git a/pctb/structure.c b/pctb/structure.c index bab3520..9b4c0b9 100644 --- a/pctb/structure.c +++ b/pctb/structure.c @@ -488,7 +488,7 @@ void analyse(FILE *tsv_output) { static Rect islandnamer; -void find_structure_islandname(CanonImage *im, RawImage *ri) { +void find_structure_islandname(CanonImage *im, RgbImage *ri) { Rect sunshiner; sunshiner.tl.x= cim->w - 1034 + 885; diff --git a/pctb/structure.h b/pctb/structure.h index 77396cf..6409c33 100644 --- a/pctb/structure.h +++ b/pctb/structure.h @@ -84,13 +84,13 @@ typedef struct { * green = data[ y*w*3 + x*3 + 1 ] = RI_PIXEL(ri,x,y)[1] * blue = data[ y*w*3 + x*3 + 2 ] = RI_PIXEL(ri,x,y)[2] */ -} RawImage; +} RgbImage; -RawImage *alloc_raw_image(int w, int h); +RgbImage *alloc_rgb_image(int w, int h); #define RI_PIXEL(ri,x,y) ((ri)->data + ((y)*(ri)->w + (x)) * 3) -#define CANONIMG_ALSO_STORERAW(ri) \ +#define CANONIMG_ALSO_STORERGB(ri) \ do{ \ char *rip= RI_PIXEL((ri),x,y); \ rip[0]= rgb >> 16; \