diff src/image.c @ 82:a4c1b7014e6e

Thu Oct 19 15:20:51 2006 John Ellis <johne@verizon.net> * image.c, typedefs.h: Add ALTER_DESATURATE alteration type. * img-view.c, layout_image.c, layout_util.c, menu.c: Allow to grayscale the display of current image with [Shift]+[G] kyboard shortcut and 'adjust' submenu item. * pixbuf_util.[ch] (pixbuf_desaturate_rect): Implement grayscale function.
author gqview
date Thu, 19 Oct 2006 19:27:20 +0000
parents 0c912a2d94f1
children 1818abf306c1
line wrap: on
line diff
--- a/src/image.c	Thu Oct 19 13:38:52 2006 +0000
+++ b/src/image.c	Thu Oct 19 19:27:20 2006 +0000
@@ -206,6 +206,11 @@
 			new = pixbuf_copy_mirror(pr->pixbuf, FALSE, TRUE);
 			y = pr->height - y;
 			break;
+		case ALTER_DESATURATE:
+			pixbuf_desaturate_rect(pr->pixbuf,
+					       0, 0,  pr->image_width, pr->image_height);
+			image_area_changed(imd, 0, 0, pr->image_width, pr->image_height);
+			break;
 		case ALTER_NONE:
 		default:
 			return;