?? bw.c
字號(hào):
#include <stdlib.h>#include <libxml/parser.h>#include "config.h"#define MODULE_FILTER#include "module.h"#include "image.h"#include "xmlhelp.h"#define MODNAME "bw"char *name = MODNAME;char *version = VERSION;intfilter(struct image *img, xmlNodePtr node, void **ctx){ unsigned char *s, *e; int y; s = img->buf; e = s + img->bufsize; while (s < e) { y = 0.299 * s[0] + 0.587 * s[1] + 0.114 * s[2]; if (y < 0) y = 0; else if (y > 255) y = 255; s[0] = s[1] = s[2] = (unsigned char) y; s += 3; } return 0;}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -