chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
constify CanonImage->rgb and make a copy in find_islandname
[ypp-sc-tools.web-live.git]
/
pctb
/
structure.h
diff --git
a/pctb/structure.h
b/pctb/structure.h
index ec7b4bf5b2490411141b66eb2e996d0423b80fe3..84fdcae2e2a1fb75c004634301b008e4c859cba4 100644
(file)
--- 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)); \
* 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; \
\
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)) { \
(im)->d[y*(w) + x]= canon_lookup_colour(r,g,b); \
} \
if (DEBUGP(rect)) { \