chiark / gitweb /
WIP island determination; rename rawimage etc. to rgbimage
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 14 Jun 2009 18:17:55 +0000 (19:17 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 14 Jun 2009 18:17:55 +0000 (19:17 +0100)
pctb/pages.c
pctb/structure.c
pctb/structure.h

index 8a837595435d8181e7735ee00873fb80a7af7ada..17ec836c0729d2e6c71a29322507b6c7f393413e 100644 (file)
@@ -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(&current,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.");
index bab3520dae05a4b7b0ff34c2081dd955c638884d..9b4c0b98cd15da21e49d6a8cafcda7438602fd70 100644 (file)
@@ -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;
index 77396cf390db06ade4c30f7279b0105aa42377c7..6409c339038c4b0d2233e5e4c4db6f8245fcdd9e 100644 (file)
@@ -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;                         \