This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via 5885e81e95f27117da33f1b68cdd7a88c3fad9c6 (commit) via 563e33e98b525b7b07f233389e7c522bbfd7aaec (commit) via ef19efc738739865ba6ff4cb33cdec083f7ccc76 (commit) via 9d8b39521423cbcc9702984c90e9c304036d0de5 (commit) via 37aec8794533c757d224024fa3ab570dd3a63b2b (commit) via 7d2fc29b64483d7cb8afafa3788e85b7080c46a3 (commit) from 8890b06aa3269a9a264cf339ff402a746594fb16 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/5885e81e95f27117da33f1b68cdd7a88c3fad...
commit 5885e81e95f27117da33f1b68cdd7a88c3fad9c6 Author: Cyril Hrubis metan@ucw.cz Date: Sun Nov 10 21:45:47 2013 +0100
spiv: Add zoom modes.
Finally spiv gets support for different zoom modes.
There are three zoom options:
* Fixed / Resizeable Window
* Turn On/Off Donwscale
* Turn On/Off Upscale
+ Maximal window size, which works best if you set it to your resolution - window decoration size.
What is still broken is fullscreen mode, we must not mess with window size when we entered fullscreen (which needs a fix at a backend level first.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/spiv/spiv.c b/demos/spiv/spiv.c index 4b2d414..428e5ea 100644 --- a/demos/spiv/spiv.c +++ b/demos/spiv/spiv.c @@ -52,33 +52,16 @@ static int abort_flag = 0; static int show_progress = 0; static int loader_running = 0;
-enum zoom_type { - /* - * Resize image to fit current size of the window. - */ - ZOOM_FIT, - - /* - * Use zoom set in zoom float and zoom offsets. - */ - ZOOM_FIXED, - - /* - * Fixed zoom but spiv tries to change - * the window size to fit the image size - */ - ZOOM_FIXED_WIN, - - /* - * Do not upscale images but downscale them - * if they are too big. - */ - ZOOM_FIT_DOWNSCALE, -}; - struct loader_params { /* current resize ratio */ - float rat; + float zoom_rat; + + /* offset in pixels */ + unsigned int zoom_x_offset; + unsigned int zoom_y_offset; + + /* flag that is turned on when user changes zoom */ + unsigned int zoom_manual;
long show_progress_once:2; /* use nearest neighbour resampling first */ @@ -91,14 +74,6 @@ struct loader_params { /* slideshow sleep */ int sleep_ms;
- /* offset in pixels */ - unsigned int zoom_x_offset; - unsigned int zoom_y_offset; - - /* zoom */ - enum zoom_type zoom_type; - float zoom; - /* caches for loaded images */ struct image_cache *img_resized_cache; }; @@ -141,25 +116,6 @@ static int image_loader_callback(GP_ProgressCallback *self)
static GP_Context *load_image(int elevate);
-/* - * Ask backend to resize window may not be implemented or authorized. If - * backend (window) is resized we will get SYS_RESIZE event, see the main event - * loop. - */ -static void resize_backend(float ratio, int shift_flag) -{ - GP_Context *img = load_image(1); - - if (!shift_flag) - ratio = 1.00 / ratio; - - unsigned int w = img->w * ratio + 0.5; - unsigned int h = img->h * ratio + 0.5; - - GP_BackendResize(backend, w, h); -} - - static const char *img_name(const char *img_path) { int i, len = strlen(img_path); @@ -268,26 +224,34 @@ static void show_info(struct loader_params *params, GP_Context *img, GP_Context *context = backend->context; const char *img_path = image_loader_img_path();
- set_caption(img_path, params->rat); + set_caption(img_path, params->zoom_rat);
if (!config.show_info) return;
- GP_Size th = GP_TextHeight(NULL); + GP_Size th = GP_TextHeight(NULL), y = 10; + + info_printf(context, 10, y, "%ux%u (%ux%u) 1:%3.3f %3.1f%%", + img->w, img->h, orig_img->w, orig_img->h, params->zoom_rat, + params->zoom_rat * 100); + y += th + 2;
- info_printf(context, 10, 10, "%ux%u (%ux%u) 1:%3.3f", - img->w, img->h, orig_img->w, orig_img->h, params->rat); + info_printf(context, 10, y, "%s", img_name(img_path));
- info_printf(context, 10, 12 + th, "%s", img_name(img_path)); + y += th + 2;
- info_printf(context, 10, 14 + 2 * th, "%s%s", - params->use_low_pass && params->rat < 1 ? "Gaussian LP + " : "", - GP_InterpolationTypeName(params->resampling_method)); + if (params->zoom_rat != 1.00) { + info_printf(context, 10, y, "%s%s", + params->use_low_pass && params->zoom_rat < 1 ? "Gaussian LP + " : "", + GP_InterpolationTypeName(params->resampling_method)); + y += th + 2; + }
unsigned int count = image_loader_count(); unsigned int pos = image_loader_pos() + 1;
- info_printf(context, 10, 16 + 3 * th, "%u of %u", pos, count); + info_printf(context, 10, y, "%u of %u", pos, count); + y += th + 2;
if (!image_loader_is_in_dir()) return; @@ -295,7 +259,7 @@ static void show_info(struct loader_params *params, GP_Context *img, unsigned int dir_count = image_loader_dir_count(); unsigned int dir_pos = image_loader_dir_pos() + 1;
- info_printf(context, 10, 18 + 4 * th, + info_printf(context, 10, y, "%u of %u in directory", dir_pos, dir_count); }
@@ -329,17 +293,22 @@ static void update_display(struct loader_params *params, GP_Context *img, int cx = 0; int cy = 0;
- switch (params->zoom_type) { - case ZOOM_FIT_DOWNSCALE: - case ZOOM_FIT: - cx = (context->w - img->w)/2; - cy = (context->h - img->h)/2; - break; - case ZOOM_FIXED: - case ZOOM_FIXED_WIN: + /* + * Center the image, if window size is fixed and + * the image is smaller than window. + */ + if (config.win_strategy == ZOOM_WIN_FIXED) { + + if (img->w < context->w) + cx = (context->w - img->w)/2; + + if (img->h < context->h) + cy = (context->h - img->h)/2; + } + + if (params->zoom_manual) { cx = params->zoom_x_offset; cy = params->zoom_y_offset; - break; }
GP_Context sub_display; @@ -364,6 +333,7 @@ static void update_display(struct loader_params *params, GP_Context *img, GP_FillRectXYWH(context, 0, 0, cx, context->h, black_pixel); GP_FillRectXYWH(context, 0, 0, context->w, cy, black_pixel);
+ int w = context->w - img->w - cx;
if (w > 0) @@ -412,12 +382,12 @@ GP_Context *load_resized_image(struct loader_params *params, GP_Size w, GP_Size }
/* Do low pass filter */ - if (params->use_low_pass && params->rat < 1) { + if (params->use_low_pass && params->zoom_rat < 1) { cpu_timer_start(&timer, "Blur"); callback.priv = "Blurring Image";
- res = GP_FilterGaussianBlurAlloc(img, 0.4/params->rat, - 0.4/params->rat, &callback); + res = GP_FilterGaussianBlurAlloc(img, 0.4/params->zoom_rat, + 0.4/params->zoom_rat, &callback);
if (res == NULL) return NULL; @@ -436,7 +406,7 @@ GP_Context *load_resized_image(struct loader_params *params, GP_Size w, GP_Size cpu_timer_stop(&timer);
/* - if (params->rat > 1.5) { + if (params->zoom_rat > 1.5) { cpu_timer_start(&timer, "Sharpening"); callback.priv = "Sharpening"; GP_FilterEdgeSharpening(i1, i1, 0.1, &callback); @@ -459,38 +429,89 @@ GP_Context *load_resized_image(struct loader_params *params, GP_Size w, GP_Size
static float calc_img_size(struct loader_params *params, uint32_t img_w, uint32_t img_h, - uint32_t src_w, uint32_t src_h) + uint32_t win_w, uint32_t win_h) { - float w_rat; - float h_rat; + float w_rat, h_rat, rat; + unsigned int max_win_w = config.max_win_w; + unsigned int max_win_h = config.max_win_h;
switch (config.orientation) { - case ROTATE_0: - case ROTATE_180: - default: - break; case ROTATE_90: case ROTATE_270: - GP_SWAP(src_w, src_h); + GP_SWAP(win_w, win_h); + GP_SWAP(max_win_w, max_win_h); + break; + default: break; }
- switch (params->zoom_type) { - case ZOOM_FIT_DOWNSCALE: - if (img_w <= src_w && img_h <= src_h) + if (params->zoom_manual) { + if (config.win_strategy == ZOOM_WIN_RESIZABLE) { + win_w = GP_MIN(max_win_w, img_w * params->zoom_rat + 0.5); + win_h = GP_MIN(max_win_h, img_h * params->zoom_rat + 0.5); + + switch (config.orientation) { + case ROTATE_90: + case ROTATE_270: + GP_BackendResize(backend, win_h, win_w); + break; + default: + GP_BackendResize(backend, win_w, win_h); + } + } + return params->zoom_rat; + } + + + if (config.win_strategy == ZOOM_WIN_RESIZABLE) { + win_w = GP_MIN(max_win_w, img_w); + win_h = GP_MIN(max_win_h, img_h); + + /* + * Image is larger than screen and downscale is enabled -> + * resize window to match image ratio. + */ + if ((win_w != img_w || win_h != img_h) && + config.zoom_strategy & ZOOM_IMAGE_DOWNSCALE) { + + w_rat = 1.00 * win_w / img_w; + h_rat = 1.00 * win_h / img_h; + + if (w_rat > 1) + w_rat = 1; + + if (h_rat > 1) + w_rat = 1; + + rat = GP_MIN(h_rat, w_rat); + + win_w = rat * img_w + 0.5; + win_h = rat * img_h + 0.5; + } + + switch (config.orientation) { + case ROTATE_90: + case ROTATE_270: + GP_BackendResize(backend, win_h, win_w); + break; + default: + GP_BackendResize(backend, win_w, win_h); + } + } + + if (img_w <= win_w && img_h <= win_h) { + if (!(config.zoom_strategy & ZOOM_IMAGE_UPSCALE)) return 1.00; - case ZOOM_FIT: - w_rat = 1.00 * src_w / img_w; - h_rat = 1.00 * src_h / img_h; - return GP_MIN(w_rat, h_rat); - case ZOOM_FIXED: - return params->zoom; - case ZOOM_FIXED_WIN: - resize_backend(params->zoom, 0); - return params->zoom; + } else { + if (!(config.zoom_strategy & ZOOM_IMAGE_DOWNSCALE)) + return 1.00; + }
- return 1.00; + w_rat = 1.00 * win_w / img_w; + h_rat = 1.00 * win_h / img_h; + + return GP_MIN(w_rat, h_rat); }
static void *image_loader(void *ptr) @@ -509,14 +530,14 @@ static void *image_loader(void *ptr) return NULL; }
- /* Figure out rotation */ + /* Figure zoom */ GP_Size w, h;
- params->rat = calc_img_size(params, orig_img->w, orig_img->h, - context->w, context->h); + params->zoom_rat = calc_img_size(params, orig_img->w, orig_img->h, + context->w, context->h);
- w = orig_img->w * params->rat + 0.5; - h = orig_img->h * params->rat + 0.5; + w = orig_img->w * params->zoom_rat + 0.5; + h = orig_img->h * params->zoom_rat + 0.5;
/* Special case => no need to resize */ if (w == orig_img->w && h == orig_img->h) { @@ -578,12 +599,14 @@ static void image_seek(struct loader_params *params, * image we are currently resamling. */ stop_loader(); + params->zoom_manual = 0; image_loader_seek(offset, whence); show_image(params); }
static void set_zoom_offset(struct loader_params *params, int dx, int dy) { + params->zoom_manual = 1; params->zoom_x_offset += dx; params->zoom_y_offset += dy; show_image(params); @@ -591,7 +614,15 @@ static void set_zoom_offset(struct loader_params *params, int dx, int dy)
static void zoom_mul(struct loader_params *params, float mul) { - params->zoom *= mul; + params->zoom_manual = 1; + params->zoom_rat *= mul; + show_image(params); +} + +static void zoom_set(struct loader_params *params, float mul) +{ + params->zoom_manual = 1; + params->zoom_rat = mul; show_image(params); }
@@ -613,6 +644,11 @@ static void init_backend(const char *backend_opts) fprintf(stderr, "Failed to initalize backend '%s'n", backend_opts); exit(1); } + + if (config.full_screen) { + if (GP_BackendIsX11(backend)) + GP_BackendX11RequestFullscreen(backend, 2); + } }
/* @@ -679,9 +715,6 @@ int main(int argc, char *argv[]) .show_nn_first = 0, .resampling_method = GP_INTERP_LINEAR_LF_INT,
- .zoom_type = ZOOM_FIT, - .zoom = 1, - .img_resized_cache = NULL,
.sleep_ms = 0, @@ -867,10 +900,25 @@ int main(int argc, char *argv[]) params.show_progress_once = 1; show_image(¶ms); break; - case GP_KEY_D: + case GP_KEY_C: image_cache_drop(params.img_resized_cache); image_loader_drop_cache(); break; + case GP_KEY_W: + config_win_toggle(); + params.show_progress_once = 1; + show_image(¶ms); + break; + case GP_KEY_U: + config_upscale_toggle(); + params.show_progress_once = 1; + show_image(¶ms); + break; + case GP_KEY_D: + config_downscale_toggle(); + params.show_progress_once = 1; + show_image(¶ms); + break; case GP_KEY_ESC: case GP_KEY_ENTER: case GP_KEY_Q: @@ -938,21 +986,34 @@ int main(int argc, char *argv[]) image_seek(¶ms, IMG_CUR, -1); break; case GP_KEY_1 ... GP_KEY_9: { - int val = ev.val.key.key - GP_KEY_1 + 1; - resize_backend(val, shift_flag); + float val = ev.val.key.key - GP_KEY_1 + 1; + + if (!shift_flag) + val = 1/val; + + zoom_set(¶ms, val); } break; case GP_KEY_0: - resize_backend(10, shift_flag); + if (shift_flag) + zoom_set(¶ms, 10); + else + zoom_set(¶ms, 0.1); break; case GP_KEY_KP_PLUS: case GP_KEY_DOT: params.show_progress_once = 1; - zoom_mul(¶ms, 1.5); + if (shift_flag) + zoom_mul(¶ms, 1.1); + else + zoom_mul(¶ms, 1.5); break; case GP_KEY_KP_MINUS: case GP_KEY_COMMA: params.show_progress_once = 1; - zoom_mul(¶ms, 1/1.5); + if (shift_flag) + zoom_mul(¶ms, 1/1.1); + else + zoom_mul(¶ms, 1/1.5); break; case GP_KEY_F1 ... GP_KEY_F10: image_action_run(ev.val.key.key - GP_KEY_F1, diff --git a/demos/spiv/spiv_config.c b/demos/spiv/spiv_config.c index 44a16d1..166a28c 100644 --- a/demos/spiv/spiv_config.c +++ b/demos/spiv/spiv_config.c @@ -36,14 +36,68 @@ struct spiv_config config = { .show_info = 0, .backend_init = "X11", .emul_type = GP_PIXEL_UNKNOWN, + .zoom_strategy = ZOOM_IMAGE_DOWNSCALE, + .win_strategy = ZOOM_WIN_FIXED, + .full_screen = 0, + .max_win_w = 1024, + .max_win_h = 768, };
static int set_zoom_strategy(struct cfg_opt *self, unsigned int lineno) { - (void) lineno; - //TODO!!! - printf("ZoomStrategy = %sn", self->val); + switch (self->opt) { + case 'w': + switch (self->val[0]) { + case 'r': + case 'R': + config.win_strategy = ZOOM_WIN_RESIZABLE; + return 0; + case 'f': + case 'F': + config.win_strategy = ZOOM_WIN_FIXED; + return 0; + } + break; + case 'z': + switch (self->val[0]) { + case 'n': + case 'N': + config.zoom_strategy = 0; + return 0; + case 'u': + case 'U': + config.zoom_strategy = ZOOM_IMAGE_UPSCALE; + return 0; + case 'd': + case 'D': + config.zoom_strategy = ZOOM_IMAGE_DOWNSCALE; + return 0; + case 'b': + case 'B': + config.zoom_strategy = ZOOM_IMAGE_UPSCALE | + ZOOM_IMAGE_DOWNSCALE; + return 0; + } + break; + } + + fprintf(stderr, "ERROR: %u: Invalid zoom strategy '%s'n", + lineno, self->val); + return 1; +} + +static int set_win_max_size(struct cfg_opt *self, unsigned int lineno) +{ + unsigned int w, h; + + if (sscanf(self->val, "%ux%u", &w, &h) != 2) { + fprintf(stderr, "ERROR: %u: Invalid max window size '%s'n", + lineno, self->val); + return 1; + }
+ config.max_win_w = w; + config.max_win_h = h; return 0; }
@@ -60,9 +114,12 @@ static int set_opt(struct cfg_opt *self, unsigned int lineno) (void) lineno;
switch (self->opt) { - case 'f': + case 'd': config.floyd_steinberg = 1; break; + case 'f': + config.full_screen = 1; + break; case 'i': config.show_info = 1; break; @@ -195,9 +252,9 @@ struct cfg_opt spiv_opts[] = { .help = "Delay between images in seconds (float) for slideshow", }, {.name_space = "Gui", - .key = "UseFloydSteinberg", - .opt = 'f', - .opt_long = "floyd-steinberg", + .key = "Dithering", + .opt = 'd', + .opt_long = "dithering", .opt_has_value = 0, .set = set_opt, .help = "Turn on Floyd-Steinberg dithering", @@ -211,6 +268,14 @@ struct cfg_opt spiv_opts[] = { .help = "Orientation, one of 0, 90, 180, 270", }, {.name_space = "Gui", + .key = "FullScreen", + .opt = 'f', + .opt_long = "full-screen", + .opt_has_value = 0, + .set = set_opt, + .help = "Start fullscreen.", + }, + {.name_space = "Gui", .key = "BackendInit", .opt = 'b', .opt_long = "backend-init", @@ -220,12 +285,29 @@ struct cfg_opt spiv_opts[] = { },
{.name_space = "Zoom", + .key = "WindowSize", + .opt = 'w', + .opt_long = "window-size", + .opt_has_value = 1, + .set = set_zoom_strategy, + .help = "Window size, resizeable (-wr) or fixed (-wf)", + }, + {.name_space = "Zoom", .key = "ZoomStrategy", .opt = 'z', .opt_long = "zoom-strategy", .opt_has_value = 1, .set = set_zoom_strategy, - .help = "Zoom strategy", + .help = "Zoom strategy, none (-zn), upscale (-zu), " + "downscale (-zd) or both (-zb)", + }, + {.name_space = "Zoom", + .key = "MaxWinSize", + .opt = 'm', + .opt_long = "max-win-size", + .opt_has_value = 1, + .set = set_win_max_size, + .help = "Window maximal size, 800x600 for example", },
diff --git a/demos/spiv/spiv_config.h b/demos/spiv/spiv_config.h index 41a83b2..e4a5c12 100644 --- a/demos/spiv/spiv_config.h +++ b/demos/spiv/spiv_config.h @@ -32,19 +32,53 @@ enum orientation { ROTATE_270, };
+enum zoom_strategy { + /* Resize window to content size */ + ZOOM_WIN_RESIZABLE = 0x00, + /* Do not change window size */ + ZOOM_WIN_FIXED = 0x01, + + /* Upscale image if window is bigger */ + ZOOM_IMAGE_UPSCALE = 0x01, + /* Downscale image if window is smaller */ + ZOOM_IMAGE_DOWNSCALE = 0x02, +}; + struct spiv_config { float slideshow_delay; enum orientation orientation; + int win_strategy:2; + int zoom_strategy:2; + /* Maximal window size */ + unsigned int max_win_w; + unsigned int max_win_h; + int show_progress:1; int show_info:1; int floyd_steinberg:1; int timers:1; + int full_screen:1; char backend_init[128]; GP_PixelType emul_type; };
extern struct spiv_config config;
+static inline void config_win_toggle(void) +{ + config.win_strategy = !config.win_strategy; +} + +static inline void config_upscale_toggle(void) +{ + config.zoom_strategy ^= ZOOM_IMAGE_UPSCALE; +} + +static inline void config_downscale_toggle(void) +{ + config.zoom_strategy ^= ZOOM_IMAGE_DOWNSCALE; +} + int spiv_config_load(const char *path);
int spiv_config_parse_args(int argc, char *argv[]); diff --git a/demos/spiv/spiv_help.c b/demos/spiv/spiv_help.c index 0d6a6b6..b3d25da 100644 --- a/demos/spiv/spiv_help.c +++ b/demos/spiv/spiv_help.c @@ -43,6 +43,9 @@ static struct key_help help_keys[] = { {"End", "Move to the last image"}, {"R", "Rotate by 90 degrees clockwise"}, {"E", "Rotate by 90 degrees counterclockwise"}, + {"W", "Toggle fixed, resizable window"}, + {"D", "Turn on/off downscale when image is larger than win"}, + {"U", "Turn on/off upscale when image is smaller than win"}, {"H", "Show help"}, {"I", "Toggle show info box"}, {"P", "Toggle show progress"}, @@ -50,16 +53,16 @@ static struct key_help help_keys[] = { {"", ""}, {"F1-F10", "Execute action 1 - 10"}, {"", ""}, - {"<, KP Minus", "Zoom out by 50%"}, - {">, KP Plus", "Zoom in by 50%"}, - {"1", "Resize spiv window to the image size"}, - {"2", "Resize spiv window to a half of the image size"}, - {"3", "Resize spiv window to one third of the image size"}, - {"9", "Resize spiv window to one ninth of the image size"}, + {"<, KP Minus", "Zoom out by 50% (by 10% with Shift)"}, + {">, KP Plus", "Zoom in by 50% (by 10% with Shift)"}, + {"1", "Resize to the image size"}, + {"2", "Resize to a half of the image size"}, + {"3", "Resize to one third of the image size"}, + {"9", "Resize to one ninth of the image size"}, {"...", ""}, - {"0", "Resize spiv window to one tenth of the image size"}, - {"Shift 2", "Resize spiv window twice of the image size"}, - {"Shift 3", "Resize spiv window three times of the image size"}, + {"0", "Resize to one tenth of the image size"}, + {"Shift 2", "Resize twice of the image size"}, + {"Shift 3", "Resize three times of the image size"}, {"...", ""}, {"Up", "Move image by 1px up (by 10 with Shift)"}, {"Down", "Move image by 1px down (by 10 with Shift)"}, @@ -69,7 +72,7 @@ static struct key_help help_keys[] = { {"]", "Change to next resampling method"}, {"[", "Change to prev resampling method"}, {"L", "Toggle low pass filter"}, - {"D", "Drop image cache"}, + {"C", "Drop image cache"}, };
static const int help_keys_len = sizeof(help_keys) / sizeof(*help_keys); @@ -90,7 +93,7 @@ static const struct examples examples[] = { "Runs slideshow with 5 second delay"}, {"spiv -1 'cp %F sorted' images/", "Copies currently loaded image into directory 'sorted/' on pressing F1"}, - {"spiv -e G1 -f images/", + {"spiv -e G1 -d images/", "Emulates 1-bit Grayscale display and turns on Floyd-Steinberg dithering"}, {"spiv -b 'X11:ROOT_WIN' -t 10 images/", "Runs slideshow using X root window as backend window"},
http://repo.or.cz/w/gfxprim.git/commit/563e33e98b525b7b07f233389e7c522bbfd7a...
commit 563e33e98b525b7b07f233389e7c522bbfd7aaec Author: Cyril Hrubis metan@ucw.cz Date: Sat Nov 9 23:21:13 2013 +0100
doc: Update dithering documentation.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/filters_dithering.txt b/doc/filters_dithering.txt index 91ac47f..2f2605b 100644 --- a/doc/filters_dithering.txt +++ b/doc/filters_dithering.txt @@ -106,54 +106,6 @@ returned. Not all pixel types all supported. If particular combination is not supported the function returns 'NULL' and sets errno to 'ENOSYS'.
-Example Images -^^^^^^^^^^^^^^ -All following images were generated using 'grinder'. -(Click for bigger size) - -.Original Image; Floyd-Steinberg, Hilbert-Peano: 1-bit, 2-bit, 4-bit, 8-bit Grayscale; 1-bit, 2-bit, 3-bit (per channel) RGB -image:images/dither/lenna_small.png[ - "Original Image", - link="images/dither/lenna.png"] -image:images/dither/lenna_G1_FS_small.png[ - "1-bit Grayscale Floyd-Steinberg", - link="images/dither/lenna_G1_FS.png"] -image:images/dither/lenna_G1_HP_small.png[ - "1-bit Grayscale Hilbert-Peano", - link="images/dither/lenna_G1_HP.png"] -image:images/dither/lenna_G2_FS_small.png[ - "2-bit Grayscale Floyd-Steinberg", - link="images/dither/lenna_G2_FS.png"] -image:images/dither/lenna_G2_HP_small.png[ - "2-bit Grayscale Hilbert-Peano", - link="images/dither/lenna_G2_HP.png"] -image:images/dither/lenna_G4_FS_small.png[ - "4-bit Grayscale Floyd-Steinberg", - link="images/dither/lenna_G4_FS.png"] -image:images/dither/lenna_G4_HP_small.png[ - "4-bit Grayscale Hilbert-Peano", - link="images/dither/lenna_G4_HP.png"] -image:images/dither/lenna_G8_FS_small.png[ - "8-bit Grayscale Floyd-Steinberg", - link="images/dither/lenna_G8_FS.png"] -image:images/dither/lenna_G8_HP_small.png[ - "7-bit Grayscale Hilbert-Peano", - link="images/dither/lenna_G8_HP.png"] -image:images/dither/lenna_RGB111_FS_small.png[ - "1-bit RGB Floyd-Steinberg", - link="images/dither/lenna_RGB111_FS.png"] -image:images/dither/lenna_RGB111_HP_small.png[ - "1-bit RGB Hilbert-Peano", - link="images/dither/lenna_RGB111_HP.png"] -image:images/dither/lenna_RGB222_FS_small.png[ - "2-bit RGB Floyd-Steinberg", - link="images/dither/lenna_RGB222_FS.png"] -image:images/dither/lenna_RGB222_HP_small.png[ - "2-bit RGB Hilbert-Peano", - link="images/dither/lenna_RGB222_HP.png"] -image:images/dither/lenna_RGB333_FS_small.png[ - "3-bit RGB Floyd-Steinberg", - link="images/dither/lenna_RGB333_FS.png"] -image:images/dither/lenna_RGB333_HP_small.png[ - "3-bit RGB Hilbert-Peano", - link="images/dither/lenna_RGB333_HP.png"] +include::images/convert/images.txt[] +include::images/floyd_steinberg/images.txt[] +include::images/hilbert_peano/images.txt[] diff --git a/doc/filters_python.txt b/doc/filters_python.txt index f1a438a..a1d260a 100644 --- a/doc/filters_python.txt +++ b/doc/filters_python.txt @@ -374,6 +374,10 @@ dithering documentation].
TIP: See link:example_py_dithering.html[dithering example].
+include::images/convert/images.txt[] +include::images/floyd_steinberg/images.txt[] +include::images/hilbert_peano/images.txt[] + Median ~~~~~~
diff --git a/doc/images/convert/images.txt b/doc/images/convert/images.txt new file mode 100644 index 0000000..63b25ef --- /dev/null +++ b/doc/images/convert/images.txt @@ -0,0 +1,20 @@ +.Original Image; Simple Conversion: RGB332, G8, G4, G2, G1 +image:images/orig/lenna_small.png[ + "Original Image", + link="images/orig/lenna.png"] +image:images/convert/lenna_small_8.png[ + "RGB332", + link="images/convert/lenna_8.png"] +image:images/convert/lenna_small_16.png[ + "G8", + link="images/convert/lenna_16.png"] +image:images/convert/lenna_small_15.png[ + "G4", + link="images/convert/lenna_15.png"] +image:images/convert/lenna_small_14.png[ + "G2", + link="images/convert/lenna_14.png"] +image:images/convert/lenna_small_13.png[ + "G1", + link="images/convert/lenna_13.png"] + diff --git a/doc/images/convert/lenna_12.png b/doc/images/convert/lenna_12.png new file mode 100644 index 0000000..2df6882 Binary files /dev/null and b/doc/images/convert/lenna_12.png differ diff --git a/doc/images/convert/lenna_13.png b/doc/images/convert/lenna_13.png new file mode 100644 index 0000000..2df6882 Binary files /dev/null and b/doc/images/convert/lenna_13.png differ diff --git a/doc/images/convert/lenna_14.png b/doc/images/convert/lenna_14.png new file mode 100644 index 0000000..86cf79d Binary files /dev/null and b/doc/images/convert/lenna_14.png differ diff --git a/doc/images/convert/lenna_15.png b/doc/images/convert/lenna_15.png new file mode 100644 index 0000000..2edb82b Binary files /dev/null and b/doc/images/convert/lenna_15.png differ diff --git a/doc/images/convert/lenna_16.png b/doc/images/convert/lenna_16.png new file mode 100644 index 0000000..4a4641d Binary files /dev/null and b/doc/images/convert/lenna_16.png differ diff --git a/doc/images/convert/lenna_5.png b/doc/images/convert/lenna_5.png new file mode 100644 index 0000000..a2ec3ad Binary files /dev/null and b/doc/images/convert/lenna_5.png differ diff --git a/doc/images/convert/lenna_6.png b/doc/images/convert/lenna_6.png new file mode 100644 index 0000000..71866be Binary files /dev/null and b/doc/images/convert/lenna_6.png differ diff --git a/doc/images/convert/lenna_8.png b/doc/images/convert/lenna_8.png new file mode 100644 index 0000000..0be1aa1 Binary files /dev/null and b/doc/images/convert/lenna_8.png differ diff --git a/doc/images/convert/lenna_small_12.png b/doc/images/convert/lenna_small_12.png new file mode 100644 index 0000000..d8206be Binary files /dev/null and b/doc/images/convert/lenna_small_12.png differ diff --git a/doc/images/convert/lenna_small_13.png b/doc/images/convert/lenna_small_13.png new file mode 100644 index 0000000..d8206be Binary files /dev/null and b/doc/images/convert/lenna_small_13.png differ diff --git a/doc/images/convert/lenna_small_14.png b/doc/images/convert/lenna_small_14.png new file mode 100644 index 0000000..993fd55 Binary files /dev/null and b/doc/images/convert/lenna_small_14.png differ diff --git a/doc/images/convert/lenna_small_15.png b/doc/images/convert/lenna_small_15.png new file mode 100644 index 0000000..e89cbd3 Binary files /dev/null and b/doc/images/convert/lenna_small_15.png differ diff --git a/doc/images/convert/lenna_small_16.png b/doc/images/convert/lenna_small_16.png new file mode 100644 index 0000000..8815db9 Binary files /dev/null and b/doc/images/convert/lenna_small_16.png differ diff --git a/doc/images/convert/lenna_small_5.png b/doc/images/convert/lenna_small_5.png new file mode 100644 index 0000000..3ae10da Binary files /dev/null and b/doc/images/convert/lenna_small_5.png differ diff --git a/doc/images/convert/lenna_small_6.png b/doc/images/convert/lenna_small_6.png new file mode 100644 index 0000000..5d9e3bd Binary files /dev/null and b/doc/images/convert/lenna_small_6.png differ diff --git a/doc/images/convert/lenna_small_8.png b/doc/images/convert/lenna_small_8.png new file mode 100644 index 0000000..0fc857f Binary files /dev/null and b/doc/images/convert/lenna_small_8.png differ diff --git a/doc/images/convolution/images.txt b/doc/images/convolution/images.txt index cf82020..b323b37 100644 --- a/doc/images/convolution/images.txt +++ b/doc/images/convolution/images.txt @@ -1,4 +1,4 @@ -.Original Image; 3x3 Box Blur, 5x5 Box Blur, 3x3 Laplacian, 3x3 Sobel, 3x3 Roberts +.Original Image; Convolution: 3x3 Box Blur, 5x5 Box Blur, 3x3 Laplacian, 3x3 Sobel, 3x3 Roberts image:images/orig/lenna_small.png[ "Original Image", link="images/orig/lenna.png"] diff --git a/doc/images/dither/lenna.png b/doc/images/dither/lenna.png deleted file mode 100644 index 475bc7a..0000000 Binary files a/doc/images/dither/lenna.png and /dev/null differ diff --git a/doc/images/dither/lenna_G1_FS.png b/doc/images/dither/lenna_G1_FS.png deleted file mode 100644 index 9f0e2c4..0000000 Binary files a/doc/images/dither/lenna_G1_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_G1_FS_small.png b/doc/images/dither/lenna_G1_FS_small.png deleted file mode 100644 index 0083f5d..0000000 Binary files a/doc/images/dither/lenna_G1_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G1_HP.png b/doc/images/dither/lenna_G1_HP.png deleted file mode 100644 index f4db5f5..0000000 Binary files a/doc/images/dither/lenna_G1_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_G1_HP_small.png b/doc/images/dither/lenna_G1_HP_small.png deleted file mode 100644 index 328f1c0..0000000 Binary files a/doc/images/dither/lenna_G1_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G2_FS.png b/doc/images/dither/lenna_G2_FS.png deleted file mode 100644 index 8854b47..0000000 Binary files a/doc/images/dither/lenna_G2_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_G2_FS_small.png b/doc/images/dither/lenna_G2_FS_small.png deleted file mode 100644 index 3c43f97..0000000 Binary files a/doc/images/dither/lenna_G2_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G2_HP.png b/doc/images/dither/lenna_G2_HP.png deleted file mode 100644 index 2c15fc0..0000000 Binary files a/doc/images/dither/lenna_G2_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_G2_HP_small.png b/doc/images/dither/lenna_G2_HP_small.png deleted file mode 100644 index 292cab6..0000000 Binary files a/doc/images/dither/lenna_G2_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G4_FS.png b/doc/images/dither/lenna_G4_FS.png deleted file mode 100644 index 207f703..0000000 Binary files a/doc/images/dither/lenna_G4_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_G4_FS_small.png b/doc/images/dither/lenna_G4_FS_small.png deleted file mode 100644 index f5017c5..0000000 Binary files a/doc/images/dither/lenna_G4_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G4_HP.png b/doc/images/dither/lenna_G4_HP.png deleted file mode 100644 index ae696a3..0000000 Binary files a/doc/images/dither/lenna_G4_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_G4_HP_small.png b/doc/images/dither/lenna_G4_HP_small.png deleted file mode 100644 index 9ff7370..0000000 Binary files a/doc/images/dither/lenna_G4_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G8_FS.png b/doc/images/dither/lenna_G8_FS.png deleted file mode 100644 index 976e32a..0000000 Binary files a/doc/images/dither/lenna_G8_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_G8_FS_small.png b/doc/images/dither/lenna_G8_FS_small.png deleted file mode 100644 index f0f6fdf..0000000 Binary files a/doc/images/dither/lenna_G8_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_G8_HP.png b/doc/images/dither/lenna_G8_HP.png deleted file mode 100644 index 976e32a..0000000 Binary files a/doc/images/dither/lenna_G8_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_G8_HP_small.png b/doc/images/dither/lenna_G8_HP_small.png deleted file mode 100644 index f0f6fdf..0000000 Binary files a/doc/images/dither/lenna_G8_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB111_FS.png b/doc/images/dither/lenna_RGB111_FS.png deleted file mode 100644 index 732ba24..0000000 Binary files a/doc/images/dither/lenna_RGB111_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB111_FS_small.png b/doc/images/dither/lenna_RGB111_FS_small.png deleted file mode 100644 index 759ab88..0000000 Binary files a/doc/images/dither/lenna_RGB111_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB111_HP.png b/doc/images/dither/lenna_RGB111_HP.png deleted file mode 100644 index 33a471f..0000000 Binary files a/doc/images/dither/lenna_RGB111_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB111_HP_small.png b/doc/images/dither/lenna_RGB111_HP_small.png deleted file mode 100644 index 444a1bf..0000000 Binary files a/doc/images/dither/lenna_RGB111_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB222_FS.png b/doc/images/dither/lenna_RGB222_FS.png deleted file mode 100644 index 9d91a5e..0000000 Binary files a/doc/images/dither/lenna_RGB222_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB222_FS_small.png b/doc/images/dither/lenna_RGB222_FS_small.png deleted file mode 100644 index 92a03d2..0000000 Binary files a/doc/images/dither/lenna_RGB222_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB222_HP.png b/doc/images/dither/lenna_RGB222_HP.png deleted file mode 100644 index fd22e14..0000000 Binary files a/doc/images/dither/lenna_RGB222_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB222_HP_small.png b/doc/images/dither/lenna_RGB222_HP_small.png deleted file mode 100644 index e1296aa..0000000 Binary files a/doc/images/dither/lenna_RGB222_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB333_FS.png b/doc/images/dither/lenna_RGB333_FS.png deleted file mode 100644 index 7b2d4c9..0000000 Binary files a/doc/images/dither/lenna_RGB333_FS.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB333_FS_small.png b/doc/images/dither/lenna_RGB333_FS_small.png deleted file mode 100644 index 45f62c9..0000000 Binary files a/doc/images/dither/lenna_RGB333_FS_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB333_HP.png b/doc/images/dither/lenna_RGB333_HP.png deleted file mode 100644 index a155107..0000000 Binary files a/doc/images/dither/lenna_RGB333_HP.png and /dev/null differ diff --git a/doc/images/dither/lenna_RGB333_HP_small.png b/doc/images/dither/lenna_RGB333_HP_small.png deleted file mode 100644 index 0fecb6b..0000000 Binary files a/doc/images/dither/lenna_RGB333_HP_small.png and /dev/null differ diff --git a/doc/images/dither/lenna_small.png b/doc/images/dither/lenna_small.png deleted file mode 100644 index ad258a1..0000000 Binary files a/doc/images/dither/lenna_small.png and /dev/null differ diff --git a/doc/images/floyd_steinberg/images.txt b/doc/images/floyd_steinberg/images.txt new file mode 100644 index 0000000..f25d162 --- /dev/null +++ b/doc/images/floyd_steinberg/images.txt @@ -0,0 +1,20 @@ +.Original Image; Floyd Steinberg Dithering: RGB332, G8, G4, G2, G1 +image:images/orig/lenna_small.png[ + "Original Image", + link="images/orig/lenna.png"] +image:images/floyd_steinberg/lenna_small_8.png[ + "RGB332", + link="images/floyd_steinberg/lenna_8.png"] +image:images/floyd_steinberg/lenna_small_16.png[ + "G8", + link="images/floyd_steinberg/lenna_16.png"] +image:images/floyd_steinberg/lenna_small_15.png[ + "G4", + link="images/floyd_steinberg/lenna_15.png"] +image:images/floyd_steinberg/lenna_small_14.png[ + "G2", + link="images/floyd_steinberg/lenna_14.png"] +image:images/floyd_steinberg/lenna_small_13.png[ + "G1", + link="images/floyd_steinberg/lenna_13.png"] + diff --git a/doc/images/floyd_steinberg/lenna_12.png b/doc/images/floyd_steinberg/lenna_12.png new file mode 100644 index 0000000..664d364 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_12.png differ diff --git a/doc/images/floyd_steinberg/lenna_13.png b/doc/images/floyd_steinberg/lenna_13.png new file mode 100644 index 0000000..664d364 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_13.png differ diff --git a/doc/images/floyd_steinberg/lenna_14.png b/doc/images/floyd_steinberg/lenna_14.png new file mode 100644 index 0000000..115fe52 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_14.png differ diff --git a/doc/images/floyd_steinberg/lenna_15.png b/doc/images/floyd_steinberg/lenna_15.png new file mode 100644 index 0000000..377b417 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_15.png differ diff --git a/doc/images/floyd_steinberg/lenna_16.png b/doc/images/floyd_steinberg/lenna_16.png new file mode 100644 index 0000000..8ebeb93 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_16.png differ diff --git a/doc/images/floyd_steinberg/lenna_5.png b/doc/images/floyd_steinberg/lenna_5.png new file mode 100644 index 0000000..fdc023d Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_5.png differ diff --git a/doc/images/floyd_steinberg/lenna_6.png b/doc/images/floyd_steinberg/lenna_6.png new file mode 100644 index 0000000..cc39931 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_6.png differ diff --git a/doc/images/floyd_steinberg/lenna_8.png b/doc/images/floyd_steinberg/lenna_8.png new file mode 100644 index 0000000..706c876 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_8.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_12.png b/doc/images/floyd_steinberg/lenna_small_12.png new file mode 100644 index 0000000..79b8220 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_12.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_13.png b/doc/images/floyd_steinberg/lenna_small_13.png new file mode 100644 index 0000000..79b8220 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_13.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_14.png b/doc/images/floyd_steinberg/lenna_small_14.png new file mode 100644 index 0000000..035c94e Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_14.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_15.png b/doc/images/floyd_steinberg/lenna_small_15.png new file mode 100644 index 0000000..42a89fb Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_15.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_16.png b/doc/images/floyd_steinberg/lenna_small_16.png new file mode 100644 index 0000000..35c4e6a Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_16.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_5.png b/doc/images/floyd_steinberg/lenna_small_5.png new file mode 100644 index 0000000..a1ac89f Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_5.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_6.png b/doc/images/floyd_steinberg/lenna_small_6.png new file mode 100644 index 0000000..4f752a7 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_6.png differ diff --git a/doc/images/floyd_steinberg/lenna_small_8.png b/doc/images/floyd_steinberg/lenna_small_8.png new file mode 100644 index 0000000..8fb3b13 Binary files /dev/null and b/doc/images/floyd_steinberg/lenna_small_8.png differ diff --git a/doc/images/hilbert_peano/images.txt b/doc/images/hilbert_peano/images.txt new file mode 100644 index 0000000..31f4b85 --- /dev/null +++ b/doc/images/hilbert_peano/images.txt @@ -0,0 +1,20 @@ +.Original Image; Hilbert Peano Dithering: RGB332, G8, G4, G2, G1 +image:images/orig/lenna_small.png[ + "Original Image", + link="images/orig/lenna.png"] +image:images/hilbert_peano/lenna_small_8.png[ + "RGB332", + link="images/hilbert_peano/lenna_8.png"] +image:images/hilbert_peano/lenna_small_16.png[ + "G8", + link="images/hilbert_peano/lenna_16.png"] +image:images/hilbert_peano/lenna_small_15.png[ + "G4", + link="images/hilbert_peano/lenna_15.png"] +image:images/hilbert_peano/lenna_small_14.png[ + "G2", + link="images/hilbert_peano/lenna_14.png"] +image:images/hilbert_peano/lenna_small_13.png[ + "G1", + link="images/hilbert_peano/lenna_13.png"] + diff --git a/doc/images/hilbert_peano/lenna_12.png b/doc/images/hilbert_peano/lenna_12.png new file mode 100644 index 0000000..beeaecc Binary files /dev/null and b/doc/images/hilbert_peano/lenna_12.png differ diff --git a/doc/images/hilbert_peano/lenna_13.png b/doc/images/hilbert_peano/lenna_13.png new file mode 100644 index 0000000..beeaecc Binary files /dev/null and b/doc/images/hilbert_peano/lenna_13.png differ diff --git a/doc/images/hilbert_peano/lenna_14.png b/doc/images/hilbert_peano/lenna_14.png new file mode 100644 index 0000000..44c1323 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_14.png differ diff --git a/doc/images/hilbert_peano/lenna_15.png b/doc/images/hilbert_peano/lenna_15.png new file mode 100644 index 0000000..fa0a067 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_15.png differ diff --git a/doc/images/hilbert_peano/lenna_16.png b/doc/images/hilbert_peano/lenna_16.png new file mode 100644 index 0000000..acb2c11 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_16.png differ diff --git a/doc/images/hilbert_peano/lenna_5.png b/doc/images/hilbert_peano/lenna_5.png new file mode 100644 index 0000000..35eb618 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_5.png differ diff --git a/doc/images/hilbert_peano/lenna_6.png b/doc/images/hilbert_peano/lenna_6.png new file mode 100644 index 0000000..105f9d1 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_6.png differ diff --git a/doc/images/hilbert_peano/lenna_8.png b/doc/images/hilbert_peano/lenna_8.png new file mode 100644 index 0000000..5201263 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_8.png differ diff --git a/doc/images/hilbert_peano/lenna_small_12.png b/doc/images/hilbert_peano/lenna_small_12.png new file mode 100644 index 0000000..399e7de Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_12.png differ diff --git a/doc/images/hilbert_peano/lenna_small_13.png b/doc/images/hilbert_peano/lenna_small_13.png new file mode 100644 index 0000000..399e7de Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_13.png differ diff --git a/doc/images/hilbert_peano/lenna_small_14.png b/doc/images/hilbert_peano/lenna_small_14.png new file mode 100644 index 0000000..f470468 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_14.png differ diff --git a/doc/images/hilbert_peano/lenna_small_15.png b/doc/images/hilbert_peano/lenna_small_15.png new file mode 100644 index 0000000..6746191 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_15.png differ diff --git a/doc/images/hilbert_peano/lenna_small_16.png b/doc/images/hilbert_peano/lenna_small_16.png new file mode 100644 index 0000000..9988d3d Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_16.png differ diff --git a/doc/images/hilbert_peano/lenna_small_5.png b/doc/images/hilbert_peano/lenna_small_5.png new file mode 100644 index 0000000..0c72eea Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_5.png differ diff --git a/doc/images/hilbert_peano/lenna_small_6.png b/doc/images/hilbert_peano/lenna_small_6.png new file mode 100644 index 0000000..106c8b3 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_6.png differ diff --git a/doc/images/hilbert_peano/lenna_small_8.png b/doc/images/hilbert_peano/lenna_small_8.png new file mode 100644 index 0000000..e9eda29 Binary files /dev/null and b/doc/images/hilbert_peano/lenna_small_8.png differ diff --git a/doc/images/regen.py b/doc/images/regen.py index 3e01756..ba540aa 100755 --- a/doc/images/regen.py +++ b/doc/images/regen.py @@ -33,6 +33,11 @@ def to_str(x, to_str):
return res
+def convert(ctx): + if (ctx.pixel_type == core.C.PIXEL_RGB332): + return ctx.Convert(core.C.PIXEL_RGB888) + return ctx + class ImgGen: def __init__(self, orig_path): self.orig_path = orig_path @@ -66,7 +71,7 @@ class ImgGen: str(x[i]) for i in range(0, len(x))]), func_params_arr))
if (descs is not None): - head = ', '.join(descs) + head = func_name + ': ' + ', '.join(descs)
self.write_asciidoc_head(dst_path, head)
@@ -86,10 +91,10 @@ class ImgGen:
self.write_img_asciidoc(desc, fname, fname_small)
- res = func(self.img, *params) + res = convert(func(self.img, *params)) res.loaders.Save('../' + fname)
- res = func(self.img_small, *params) + res = convert(func(self.img_small, *params)) res.loaders.Save('../' + fname_small)
self.write_asciidoc_tail() @@ -180,5 +185,42 @@ def main(): '3x3 Sobel', '3x3 Roberts'])
+ imggen.gen(core.Convert, ['p'], + [ + [core.C.PIXEL_RGB332], + [core.C.PIXEL_G8], + [core.C.PIXEL_G4], + [core.C.PIXEL_G2], + [core.C.PIXEL_G1], + ], + 'images/convert/', + 'Simple Conversion', + ['RGB332', 'G8', 'G4', 'G2', 'G1']) + + imggen.gen(filters.FloydSteinbergAlloc, ['p'], + [ + [core.C.PIXEL_RGB332], + [core.C.PIXEL_G8], + [core.C.PIXEL_G4], + [core.C.PIXEL_G2], + [core.C.PIXEL_G1], + ], + 'images/floyd_steinberg/', + 'Floyd Steinberg Dithering', + ['RGB332', 'G8', 'G4', 'G2', 'G1']) + + imggen.gen(filters.HilbertPeanoAlloc, ['p'], + [ + [core.C.PIXEL_RGB332], + [core.C.PIXEL_G8], + [core.C.PIXEL_G4], + [core.C.PIXEL_G2], + [core.C.PIXEL_G1], + ], + 'images/hilbert_peano/', + 'Hilbert Peano Dithering', + ['RGB332', 'G8', 'G4', 'G2', 'G1']) + + if __name__ == '__main__': main()
http://repo.or.cz/w/gfxprim.git/commit/ef19efc738739865ba6ff4cb33cdec083f7cc...
commit ef19efc738739865ba6ff4cb33cdec083f7ccc76 Author: Cyril Hrubis metan@ucw.cz Date: Sat Nov 9 23:17:13 2013 +0100
gfxprim_config.py: Add RGB332 8BPP.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/gfxprim_config.py b/gfxprim_config.py index 4dcba55..b972c0e 100644 --- a/gfxprim_config.py +++ b/gfxprim_config.py @@ -81,6 +81,11 @@ config = GfxPrimConfig( ('G', 6, 6), ('B', 0, 6)]),
+ PixelType(name='RGB332', pixelsize=PS_8BPP, chanslist=[ + ('R', 5, 3), + ('G', 2, 3), + ('B', 0, 2)]), + # # CMYK #
http://repo.or.cz/w/gfxprim.git/commit/9d8b39521423cbcc9702984c90e9c304036d0...
commit 9d8b39521423cbcc9702984c90e9c304036d0de5 Author: Cyril Hrubis metan@ucw.cz Date: Sat Nov 9 23:10:08 2013 +0100
pywrap: core: Add Convert to module.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/pylib/gfxprim/core/__init__.py b/pylib/gfxprim/core/__init__.py index 9ad8eea..00bba2a 100644 --- a/pylib/gfxprim/core/__init__.py +++ b/pylib/gfxprim/core/__init__.py @@ -195,9 +195,10 @@ def _init(module): '^GP_PixelRGB.*$', # ...Lookup and ...Match '^GP_PixelToRGB.*$', # Needs love '^GP_RGB.*$', # Needs filtering - #'^GP_ProgressCallback.*$', # Needs work ])
+ module['Convert'] = c_core.GP_ContextConvertAlloc + _init(locals()) del _init
http://repo.or.cz/w/gfxprim.git/commit/37aec8794533c757d224024fa3ab570dd3a63...
commit 37aec8794533c757d224024fa3ab570dd3a63b2b Author: Cyril Hrubis metan@ucw.cz Date: Sat Nov 9 22:10:14 2013 +0100
doc: Fix typos.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/core_python.txt b/doc/core_python.txt index cd60469..033846d 100644 --- a/doc/core_python.txt +++ b/doc/core_python.txt @@ -142,9 +142,9 @@ Debug Functions ------------------------------------------------------------------------------- import gfxprim.core as core
- core.GP_SetDebugLevel(10) + core.SetDebugLevel(10)
- level = core.GP_GetDebugLevel() + level = core.GetDebugLevel() -------------------------------------------------------------------------------
Sets and gets the GFXprim debug level. See link:debug.html[debug messages]
http://repo.or.cz/w/gfxprim.git/commit/7d2fc29b64483d7cb8afafa3788e85b7080c4...
commit 7d2fc29b64483d7cb8afafa3788e85b7080c46a3 Author: Cyril Hrubis metan@ucw.cz Date: Sat Nov 9 22:00:28 2013 +0100
doc: Update the about page.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/about.txt b/doc/about.txt index 1dc7ce5..7029823 100644 --- a/doc/about.txt +++ b/doc/about.txt @@ -127,8 +127,10 @@ image filters. [width="100%",options="header"] |============================================================================= | Filter Name | Supported Pixel Type | Multithreaded -| Brightness | All | No -| Contrast | All | No +| Brightness | All | Not Applicable +| Contrast | All | Not Applicable +| Invert | All | Not Applicable +| Posterize | All | Not Applicable |=============================================================================
.Currently Implemented Linear Filters @@ -142,12 +144,7 @@ image filters. | Prewitt Edge Detection | RGB888 | Yes |=============================================================================
-NOTE: Linear filters are implemented using generic convolution filters, once - convolution is rewritten to run for all pixel types the rest of filters - will support them automatically. - - -.Currently Implemented Linear Filters +.Currently Implemented Aritmetic Filters [width="100%",options="header"] |============================================================================= | Filter Name | Supported Pixel Type | Multithreaded @@ -211,10 +208,10 @@ backend of any pixel type on the top of other backends. Python bindings ---------------
-Python bindings currently covers most of the library, there is (not yet -finished) documentation for link:core_python.html[Core], -link:gfx_python.html[Gfx], link:loaders_python.html[Loaders] and -link:backends_python.html[Backends]. +Python bindings currently covers most of the library, there is (work in +progress) documentation for link:core_python.html[Core], +link:gfx_python.html[Gfx], link:loaders_python.html[Loaders], +link:filters_python.html[Filters] and link:backends_python.html[Backends].
Work in progress ----------------
-----------------------------------------------------------------------
Summary of changes: demos/spiv/spiv.c | 283 +++++++++++++++---------- demos/spiv/spiv_config.c | 98 ++++++++- demos/spiv/spiv_config.h | 34 +++ demos/spiv/spiv_help.c | 25 ++- doc/about.txt | 21 +- doc/core_python.txt | 4 +- doc/filters_dithering.txt | 54 +----- doc/filters_python.txt | 4 + doc/images/convert/images.txt | 20 ++ doc/images/convert/lenna_12.png | Bin 0 -> 3848 bytes doc/images/convert/lenna_13.png | Bin 0 -> 3848 bytes doc/images/convert/lenna_14.png | Bin 0 -> 13581 bytes doc/images/convert/lenna_15.png | Bin 0 -> 49011 bytes doc/images/convert/lenna_16.png | Bin 0 -> 133711 bytes doc/images/convert/lenna_5.png | Bin 0 -> 222762 bytes doc/images/convert/lenna_6.png | Bin 0 -> 256908 bytes doc/images/convert/lenna_8.png | Bin 0 -> 94823 bytes doc/images/convert/lenna_small_12.png | Bin 0 -> 525 bytes doc/images/convert/lenna_small_13.png | Bin 0 -> 525 bytes doc/images/convert/lenna_small_14.png | Bin 0 -> 1594 bytes doc/images/convert/lenna_small_15.png | Bin 0 -> 4711 bytes doc/images/convert/lenna_small_16.png | Bin 0 -> 10649 bytes doc/images/convert/lenna_small_5.png | Bin 0 -> 19379 bytes doc/images/convert/lenna_small_6.png | Bin 0 -> 21801 bytes doc/images/convert/lenna_small_8.png | Bin 0 -> 9433 bytes doc/images/convolution/images.txt | 2 +- doc/images/dither/lenna.png | Bin 394244 -> 0 bytes doc/images/dither/lenna_G1_FS.png | Bin 44134 -> 0 bytes doc/images/dither/lenna_G1_FS_small.png | Bin 11690 -> 0 bytes doc/images/dither/lenna_G1_HP.png | Bin 54940 -> 0 bytes doc/images/dither/lenna_G1_HP_small.png | Bin 14357 -> 0 bytes doc/images/dither/lenna_G2_FS.png | Bin 69665 -> 0 bytes doc/images/dither/lenna_G2_FS_small.png | Bin 18380 -> 0 bytes doc/images/dither/lenna_G2_HP.png | Bin 74316 -> 0 bytes doc/images/dither/lenna_G2_HP_small.png | Bin 20234 -> 0 bytes doc/images/dither/lenna_G4_FS.png | Bin 92560 -> 0 bytes doc/images/dither/lenna_G4_FS_small.png | Bin 26452 -> 0 bytes doc/images/dither/lenna_G4_HP.png | Bin 116264 -> 0 bytes doc/images/dither/lenna_G4_HP_small.png | Bin 31754 -> 0 bytes doc/images/dither/lenna_G8_FS.png | Bin 221478 -> 0 bytes doc/images/dither/lenna_G8_FS_small.png | Bin 67801 -> 0 bytes doc/images/dither/lenna_G8_HP.png | Bin 221478 -> 0 bytes doc/images/dither/lenna_G8_HP_small.png | Bin 67801 -> 0 bytes doc/images/dither/lenna_RGB111_FS.png | Bin 109889 -> 0 bytes doc/images/dither/lenna_RGB111_FS_small.png | Bin 27757 -> 0 bytes doc/images/dither/lenna_RGB111_HP.png | Bin 124334 -> 0 bytes doc/images/dither/lenna_RGB111_HP_small.png | Bin 31358 -> 0 bytes doc/images/dither/lenna_RGB222_FS.png | Bin 162688 -> 0 bytes doc/images/dither/lenna_RGB222_FS_small.png | Bin 41646 -> 0 bytes doc/images/dither/lenna_RGB222_HP.png | Bin 167382 -> 0 bytes doc/images/dither/lenna_RGB222_HP_small.png | Bin 43323 -> 0 bytes doc/images/dither/lenna_RGB333_FS.png | Bin 196644 -> 0 bytes doc/images/dither/lenna_RGB333_FS_small.png | Bin 52995 -> 0 bytes doc/images/dither/lenna_RGB333_HP.png | Bin 227055 -> 0 bytes doc/images/dither/lenna_RGB333_HP_small.png | Bin 63795 -> 0 bytes doc/images/dither/lenna_small.png | Bin 116129 -> 0 bytes doc/images/floyd_steinberg/images.txt | 20 ++ doc/images/floyd_steinberg/lenna_12.png | Bin 0 -> 25518 bytes doc/images/floyd_steinberg/lenna_13.png | Bin 0 -> 25518 bytes doc/images/floyd_steinberg/lenna_14.png | Bin 0 -> 32906 bytes doc/images/floyd_steinberg/lenna_15.png | Bin 0 -> 57697 bytes doc/images/floyd_steinberg/lenna_16.png | Bin 0 -> 134574 bytes doc/images/floyd_steinberg/lenna_5.png | Bin 0 -> 283437 bytes doc/images/floyd_steinberg/lenna_6.png | Bin 0 -> 313739 bytes doc/images/floyd_steinberg/lenna_8.png | Bin 0 -> 202928 bytes doc/images/floyd_steinberg/lenna_small_12.png | Bin 0 -> 1860 bytes doc/images/floyd_steinberg/lenna_small_13.png | Bin 0 -> 1860 bytes doc/images/floyd_steinberg/lenna_small_14.png | Bin 0 -> 2589 bytes doc/images/floyd_steinberg/lenna_small_15.png | Bin 0 -> 4878 bytes doc/images/floyd_steinberg/lenna_small_16.png | Bin 0 -> 10663 bytes doc/images/floyd_steinberg/lenna_small_5.png | Bin 0 -> 21023 bytes doc/images/floyd_steinberg/lenna_small_6.png | Bin 0 -> 23240 bytes doc/images/floyd_steinberg/lenna_small_8.png | Bin 0 -> 14641 bytes doc/images/hilbert_peano/images.txt | 20 ++ doc/images/hilbert_peano/lenna_12.png | Bin 0 -> 29715 bytes doc/images/hilbert_peano/lenna_13.png | Bin 0 -> 29715 bytes doc/images/hilbert_peano/lenna_14.png | Bin 0 -> 38462 bytes doc/images/hilbert_peano/lenna_15.png | Bin 0 -> 62785 bytes doc/images/hilbert_peano/lenna_16.png | Bin 0 -> 134812 bytes doc/images/hilbert_peano/lenna_5.png | Bin 0 -> 323202 bytes doc/images/hilbert_peano/lenna_6.png | Bin 0 -> 347587 bytes doc/images/hilbert_peano/lenna_8.png | Bin 0 -> 222712 bytes doc/images/hilbert_peano/lenna_small_12.png | Bin 0 -> 2067 bytes doc/images/hilbert_peano/lenna_small_13.png | Bin 0 -> 2067 bytes doc/images/hilbert_peano/lenna_small_14.png | Bin 0 -> 2847 bytes doc/images/hilbert_peano/lenna_small_15.png | Bin 0 -> 5233 bytes doc/images/hilbert_peano/lenna_small_16.png | Bin 0 -> 10687 bytes doc/images/hilbert_peano/lenna_small_5.png | Bin 0 -> 22327 bytes doc/images/hilbert_peano/lenna_small_6.png | Bin 0 -> 24315 bytes doc/images/hilbert_peano/lenna_small_8.png | Bin 0 -> 17012 bytes doc/images/regen.py | 48 ++++- gfxprim_config.py | 5 + pylib/gfxprim/core/__init__.py | 3 +- 93 files changed, 441 insertions(+), 200 deletions(-) create mode 100644 doc/images/convert/images.txt create mode 100644 doc/images/convert/lenna_12.png create mode 100644 doc/images/convert/lenna_13.png create mode 100644 doc/images/convert/lenna_14.png create mode 100644 doc/images/convert/lenna_15.png create mode 100644 doc/images/convert/lenna_16.png create mode 100644 doc/images/convert/lenna_5.png create mode 100644 doc/images/convert/lenna_6.png create mode 100644 doc/images/convert/lenna_8.png create mode 100644 doc/images/convert/lenna_small_12.png create mode 100644 doc/images/convert/lenna_small_13.png create mode 100644 doc/images/convert/lenna_small_14.png create mode 100644 doc/images/convert/lenna_small_15.png create mode 100644 doc/images/convert/lenna_small_16.png create mode 100644 doc/images/convert/lenna_small_5.png create mode 100644 doc/images/convert/lenna_small_6.png create mode 100644 doc/images/convert/lenna_small_8.png delete mode 100644 doc/images/dither/lenna.png delete mode 100644 doc/images/dither/lenna_G1_FS.png delete mode 100644 doc/images/dither/lenna_G1_FS_small.png delete mode 100644 doc/images/dither/lenna_G1_HP.png delete mode 100644 doc/images/dither/lenna_G1_HP_small.png delete mode 100644 doc/images/dither/lenna_G2_FS.png delete mode 100644 doc/images/dither/lenna_G2_FS_small.png delete mode 100644 doc/images/dither/lenna_G2_HP.png delete mode 100644 doc/images/dither/lenna_G2_HP_small.png delete mode 100644 doc/images/dither/lenna_G4_FS.png delete mode 100644 doc/images/dither/lenna_G4_FS_small.png delete mode 100644 doc/images/dither/lenna_G4_HP.png delete mode 100644 doc/images/dither/lenna_G4_HP_small.png delete mode 100644 doc/images/dither/lenna_G8_FS.png delete mode 100644 doc/images/dither/lenna_G8_FS_small.png delete mode 100644 doc/images/dither/lenna_G8_HP.png delete mode 100644 doc/images/dither/lenna_G8_HP_small.png delete mode 100644 doc/images/dither/lenna_RGB111_FS.png delete mode 100644 doc/images/dither/lenna_RGB111_FS_small.png delete mode 100644 doc/images/dither/lenna_RGB111_HP.png delete mode 100644 doc/images/dither/lenna_RGB111_HP_small.png delete mode 100644 doc/images/dither/lenna_RGB222_FS.png delete mode 100644 doc/images/dither/lenna_RGB222_FS_small.png delete mode 100644 doc/images/dither/lenna_RGB222_HP.png delete mode 100644 doc/images/dither/lenna_RGB222_HP_small.png delete mode 100644 doc/images/dither/lenna_RGB333_FS.png delete mode 100644 doc/images/dither/lenna_RGB333_FS_small.png delete mode 100644 doc/images/dither/lenna_RGB333_HP.png delete mode 100644 doc/images/dither/lenna_RGB333_HP_small.png delete mode 100644 doc/images/dither/lenna_small.png create mode 100644 doc/images/floyd_steinberg/images.txt create mode 100644 doc/images/floyd_steinberg/lenna_12.png create mode 100644 doc/images/floyd_steinberg/lenna_13.png create mode 100644 doc/images/floyd_steinberg/lenna_14.png create mode 100644 doc/images/floyd_steinberg/lenna_15.png create mode 100644 doc/images/floyd_steinberg/lenna_16.png create mode 100644 doc/images/floyd_steinberg/lenna_5.png create mode 100644 doc/images/floyd_steinberg/lenna_6.png create mode 100644 doc/images/floyd_steinberg/lenna_8.png create mode 100644 doc/images/floyd_steinberg/lenna_small_12.png create mode 100644 doc/images/floyd_steinberg/lenna_small_13.png create mode 100644 doc/images/floyd_steinberg/lenna_small_14.png create mode 100644 doc/images/floyd_steinberg/lenna_small_15.png create mode 100644 doc/images/floyd_steinberg/lenna_small_16.png create mode 100644 doc/images/floyd_steinberg/lenna_small_5.png create mode 100644 doc/images/floyd_steinberg/lenna_small_6.png create mode 100644 doc/images/floyd_steinberg/lenna_small_8.png create mode 100644 doc/images/hilbert_peano/images.txt create mode 100644 doc/images/hilbert_peano/lenna_12.png create mode 100644 doc/images/hilbert_peano/lenna_13.png create mode 100644 doc/images/hilbert_peano/lenna_14.png create mode 100644 doc/images/hilbert_peano/lenna_15.png create mode 100644 doc/images/hilbert_peano/lenna_16.png create mode 100644 doc/images/hilbert_peano/lenna_5.png create mode 100644 doc/images/hilbert_peano/lenna_6.png create mode 100644 doc/images/hilbert_peano/lenna_8.png create mode 100644 doc/images/hilbert_peano/lenna_small_12.png create mode 100644 doc/images/hilbert_peano/lenna_small_13.png create mode 100644 doc/images/hilbert_peano/lenna_small_14.png create mode 100644 doc/images/hilbert_peano/lenna_small_15.png create mode 100644 doc/images/hilbert_peano/lenna_small_16.png create mode 100644 doc/images/hilbert_peano/lenna_small_5.png create mode 100644 doc/images/hilbert_peano/lenna_small_6.png create mode 100644 doc/images/hilbert_peano/lenna_small_8.png
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.