X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=blobdiff_plain;f=pctb%2Fstructure.h;fp=pctb%2Fstructure.h;h=84fdcae2e2a1fb75c004634301b008e4c859cba4;hp=ec7b4bf5b2490411141b66eb2e996d0423b80fe3;hb=e78d72697e53d276737fae8519c921c70f0709f7;hpb=d71e935797af1a2a5514f50fb052351e5b30e201 diff --git a/pctb/structure.h b/pctb/structure.h index ec7b4bf..84fdcae 100644 --- a/pctb/structure.h +++ b/pctb/structure.h @@ -61,14 +61,15 @@ static inline char canon_lookup_colour(unsigned char r, * each pixel in reading order. \ */ \ (im)= alloc_canon_image((w), (h)); \ - (im)->rgb= alloc_rgb_image((w), (h)); \ + RgbImage *rgb_save; \ + (im)->rgb= rgb_save= alloc_rgb_image((w), (h)); \ \ int x,y; \ for (y=0; y<(h); y++) { \ for (x=0; x<(w); x++) { \ unsigned char r,g,b; \ COMPUTE_RGB; \ - CANONIMG_ALSO_STORERGB((im)->rgb); \ + CANONIMG_ALSO_STORERGB(rgb_save); \ (im)->d[y*(w) + x]= canon_lookup_colour(r,g,b); \ } \ if (DEBUGP(rect)) { \