tags 557657 pending
thanks

The attached patch seems to work for me.
From 8e08f1e7743af6094fe8672a96758dd732323db5 Mon Sep 17 00:00:00 2001
From: Jeffrey Ratcliffe <[email protected]>
Date: Tue, 24 Nov 2009 09:31:37 +0100
Subject: [PATCH 1/2] Force bilevel image after thresholding

---
 History       |    2 ++
 bin/gscan2pdf |    4 +---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/History b/History
index 484df37..ef21598 100644
--- a/History
+++ b/History
@@ -16,6 +16,8 @@
 * + basic functionality to view and modify numerical array scan options in graphical format
 * Incorporate PDF metadata in filename
   Closes 2185401 (Save Dialog: option to concatenate date+title in filename)
+* Force bilevel image after thresholding
+  Closes Debian bug #557657 (gscan2pdf binarization option [wishlist])
 
 
 0.9.29 (04.05.2009):
diff --git a/bin/gscan2pdf b/bin/gscan2pdf
index 5deff33..f58e7f7 100755
--- a/bin/gscan2pdf
+++ b/bin/gscan2pdf
@@ -8584,9 +8584,7 @@ sub threshold {
     $slist -> get_model -> signal_handler_unblock($slist -> {row_changed_signal});
 
 # Write it
-    my $suffix;
-    $suffix = $1 if ($filename =~ /(\.\w*)$/);
-    (undef, $filename) = tempfile(DIR => $SETTING{session}, SUFFIX => $suffix);
+    (undef, $filename) = tempfile(DIR => $SETTING{session}, SUFFIX => '.pbm');
     $x = $image->Write(filename => $filename);
     warn "$x" if "$x";
     warn "Thresholding at $SETTING{'threshold tool'} to $filename\n" if $debug;
-- 
1.6.3.3

Attachment: signature.asc
Description: Digital signature

Reply via email to