[gimp/metadata-browser] pdb: restore the ability to reset the dither matrix to default



commit d4c7d33b18c5d810daba934b3b065344bbdbd4d5
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 8 20:28:38 2011 +0200

    pdb: restore the ability to reset the dither matrix to default

 app/pdb/convert-cmds.c       |    2 +-
 tools/pdbgen/pdb/convert.pdb |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/pdb/convert-cmds.c b/app/pdb/convert-cmds.c
index 9d3b8a4..7702af6 100644
--- a/app/pdb/convert-cmds.c
+++ b/app/pdb/convert-cmds.c
@@ -197,7 +197,7 @@ image_convert_set_dither_matrix_invoker (GimpProcedure      *procedure,
 
   if (success)
     {
-      if (matrix_length == width * height)
+      if (width == 0 || height == 0 || matrix_length == width * height)
         {
           gimp_image_convert_set_dither_matrix (matrix, width, height);
         }
diff --git a/tools/pdbgen/pdb/convert.pdb b/tools/pdbgen/pdb/convert.pdb
index 9490117..1368414 100644
--- a/tools/pdbgen/pdb/convert.pdb
+++ b/tools/pdbgen/pdb/convert.pdb
@@ -201,7 +201,7 @@ HELP
     %invoke = (
 	code => <<'CODE'
 {
-  if (matrix_length == width * height)
+  if (width == 0 || height == 0 || matrix_length == width * height)
     {
       gimp_image_convert_set_dither_matrix (matrix, width, height);
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]