Image.st
changeset 800 0730bb75c28f
parent 798 31ed4a1d4b4a
child 804 f1921926e324
--- a/Image.st	Fri Jun 07 19:42:45 1996 +0200
+++ b/Image.st	Fri Jun 07 19:43:27 1996 +0200
@@ -1570,10 +1570,13 @@
 
      i8 := i asOrderedDitheredGrayImageDepth:8.
      i8 inspect.
+
+     i2 := i8 asOrderedDitheredGrayImageDepth:2.
+     i2 inspect.
     "
 
     "Created: 7.6.1996 / 18:03:54 / cg"
-    "Modified: 7.6.1996 / 19:25:03 / cg"
+    "Modified: 7.6.1996 / 19:41:59 / cg"
 !
 
 asOrderedDitheredMonochromeFormOn:aDevice
@@ -1795,6 +1798,19 @@
 asThresholdGrayImageDepth:depth
     "return a thresholded depth-x grey image from the receiver image."
 
+    depth == 1 ifTrue:[
+        "/ for monochrome, there is highly specialized
+        "/ monochrome dither code available
+
+        ^ Depth1Image
+            width:width
+            height:height
+            fromArray:(
+                self
+                    orderedDitheredMonochromeBitsWithDitherMatrix:#[8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8]
+                    ditherWidth:4)
+    ].
+
     ^ (self class implementorForDepth:depth)
         width:width
         height:height
@@ -1822,7 +1838,7 @@
     "
 
     "Created: 7.6.1996 / 18:13:33 / cg"
-    "Modified: 7.6.1996 / 18:23:51 / cg"
+    "Modified: 7.6.1996 / 19:39:37 / cg"
 !
 
 asThresholdMonochromeFormOn:aDevice
@@ -4590,6 +4606,6 @@
 !Image class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.81 1996-06-07 17:30:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.82 1996-06-07 17:43:27 cg Exp $'
 ! !
 Image initialize!