chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Is faster now
[ypp-sc-tools.db-live.git]
/
pctb
/
convert.h
diff --git
a/pctb/convert.h
b/pctb/convert.h
index 83be1e8bced1ab8fce05d7233588595792f74530..6601b77386c20a8fa3a5c1f23db7e69179735887 100644
(file)
--- a/
pctb/convert.h
+++ b/
pctb/convert.h
@@
-51,6
+51,8
@@
typedef struct RgbImage {
*/
} RgbImage;
*/
} 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);
void identify_rgbimage(const RgbImage *base, Rect portion,
char result[MAXIMGIDENT], const char *what);
RgbImage *alloc_rgb_image(int w, int h);
@@
-58,11
+60,19
@@
void fwrite_ppmraw(FILE *f, const RgbImage *ri);
#define RI_PIXEL(ri,x,y) ((ri)->data + ((y)*(ri)->w + (x)) * 3)
#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 -----*/
/*----- from structure.c -----*/
-void find_structure(
const
CanonImage *im, int *max_relevant_y_r);
+void find_structure(CanonImage *im, int *max_relevant_y_r);
Rect find_sunshine_widget(void);
Rect find_sunshine_widget(void);
+void canon_colour_prepare(void);
void find_islandname(RgbImage *ri);
void check_correct_commodities(void);
void read_screenshots(void);
void find_islandname(RgbImage *ri);
void check_correct_commodities(void);
void read_screenshots(void);
@@
-87,20
+97,24
@@
void vprogress_spinner(const char *fmt, va_list) FMT(1,0);
void progress_spinner(const char *fmt, ...) FMT(1,2);
enum flags {
void progress_spinner(const char *fmt, ...) FMT(1,2);
enum flags {
- ff_editcharset= 00001,
- ff_singlepage= 00002,
- ff_testservers= 00004,
+ ff_singlepage= 000002,
+ ff_testservers= 000004,
+
+ ff_charset_edit= 000010,
+ ff_charset_allowedit= 000020,
+ ff_charset_havelocal= 000040,
+ ffm_charset= 000070,
- ff_dict_fetch=
0001
0,
- ff_dict_submit=
0002
0,
- ff_dict_pirate=
0004
0,
- ffs_dict=
0007
0,
-
- ff_needisland=
001
00,
- ff_printisland=
002
00,
- ff_upload=
004
00,
- ffs_printisland=
003
00,
- ffs_upload=
005
00,
+ ff_dict_fetch=
00010
0,
+ ff_dict_submit=
00020
0,
+ ff_dict_pirate=
00040
0,
+ ffs_dict=
00070
0,
+
+ ff_needisland=
0010
00,
+ ff_printisland=
0020
00,
+ ff_upload=
0040
00,
+ ffs_printisland=
0030
00,
+ ffs_upload=
0050
00,
};
extern enum flags o_flags;
};
extern enum flags o_flags;
@@
-115,7
+129,7
@@
void find_yppclient_window(void);
void take_screenshots(void);
void take_one_screenshot(void);
void take_screenshots(void);
void take_one_screenshot(void);
-#define MAX_PAGES 100
+#define MAX_PAGES 100
0
extern CanonImage *page_images[MAX_PAGES];
extern int npages;
extern CanonImage *page_images[MAX_PAGES];
extern int npages;