Use GTK_PREVIEW_GRAYSCALE if source is grayscale or grayscale-alpha.

2004-06-26  Philip Lafleur  <plafleur@cvs.gnome.org>

	* plug-ins/common/unsharp.c: Use GTK_PREVIEW_GRAYSCALE if source
	is grayscale or grayscale-alpha. Partial fix for bug #144971.
This commit is contained in:
Philip Lafleur
2004-06-26 19:08:08 +00:00
committed by Philip Lafleur
parent 6f745997b1
commit a151042dd6
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2004-06-26 Philip Lafleur <plafleur@cvs.gnome.org>
* plug-ins/common/unsharp.c: Use GTK_PREVIEW_GRAYSCALE if source
is grayscale or grayscale-alpha. Partial fix for bug #144971.
2004-06-25 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/unsharp.c: speed up preview by allocating tile

View File

@ -673,7 +673,11 @@ unsharp_preview_new (void)
gtk_table_attach (GTK_TABLE (table), frame, 0, 1, 0, 1, 0, 0, 0, 0);
gtk_widget_show (frame);
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
if (gimp_drawable_type (drawable->drawable_id) == GIMP_GRAY_IMAGE ||
gimp_drawable_type (drawable->drawable_id) == GIMP_GRAYA_IMAGE)
preview = gtk_preview_new (GTK_PREVIEW_GRAYSCALE);
else
preview = gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (preview), preview_width, preview_height);
gtk_container_add (GTK_CONTAINER (frame), preview);
gtk_widget_show (preview);