equal
deleted
inserted
replaced
2892 "/ for monochrome, there is specialized |
2892 "/ for monochrome, there is specialized |
2893 "/ monochrome dither code available |
2893 "/ monochrome dither code available |
2894 |
2894 |
2895 bits := self floydSteinbergDitheredMonochromeBits. |
2895 bits := self floydSteinbergDitheredMonochromeBits. |
2896 ] ifFalse:[ |
2896 ] ifFalse:[ |
2897 bits := self floydSteinbergDitheredBitsDepth:depth. |
2897 bits := self floydSteinbergDitheredGrayBitsDepth:depth. |
2898 ]. |
2898 ]. |
2899 |
2899 |
2900 ^ self makeDeviceGrayPixmapOn:aDevice depth:depth fromArray:bits |
2900 ^ self makeDeviceGrayPixmapOn:aDevice depth:depth fromArray:bits |
2901 |
2901 |
2902 " |
2902 " |
2924 |
2924 |
2925 (depth == 1) ifTrue:[ |
2925 (depth == 1) ifTrue:[ |
2926 ^ self asFloydSteinbergDitheredMonochromeImage |
2926 ^ self asFloydSteinbergDitheredMonochromeImage |
2927 ]. |
2927 ]. |
2928 |
2928 |
2929 ditheredBits := self floydSteinbergDitheredBitsDepth:depth. |
2929 ditheredBits := self floydSteinbergDitheredGrayBitsDepth:depth. |
2930 ^ (self class implementorForDepth:depth) |
2930 ^ (self class implementorForDepth:depth) |
2931 width:width height:height fromArray:ditheredBits |
2931 width:width height:height fromArray:ditheredBits |
2932 |
2932 |
2933 " |
2933 " |
2934 |i| |
2934 |i| |
5314 |
5314 |
5315 "Created: 10.6.1996 / 12:18:20 / cg" |
5315 "Created: 10.6.1996 / 12:18:20 / cg" |
5316 "Modified: 10.6.1996 / 13:16:33 / cg" |
5316 "Modified: 10.6.1996 / 13:16:33 / cg" |
5317 ! |
5317 ! |
5318 |
5318 |
5319 floydSteinbergDitheredBitsDepth:depth |
5319 floydSteinbergDitheredGrayBitsDepth:depth |
5320 "return the bitmap for a dithered depth bitmap from the image. |
5320 "return the bits for dithering a gray image from the image. |
5321 Works for any source depths / photometric, |
5321 Works for any source depths / photometric, |
5322 but very slow since each pixel is processed individually. |
5322 but possibly slow since each pixel is processed individually. |
5323 Redefined by some subclasses for more performance (D8Image)" |
5323 Redefined by some subclasses for more performance (D8Image/D24Image)" |
5324 |
5324 |
5325 |dstIndex "{Class: SmallInteger }" |
5325 |dstIndex "{Class: SmallInteger }" |
5326 nextDst "{Class: SmallInteger }" |
5326 nextDst "{Class: SmallInteger }" |
5327 bytesPerOutRow "{Class: SmallInteger }" |
5327 bytesPerOutRow "{Class: SmallInteger }" |
5328 outBits greyValues greyErrors greyPixels greyLevels |
5328 outBits greyValues greyErrors greyPixels greyLevels |
10908 ! ! |
10908 ! ! |
10909 |
10909 |
10910 !Image class methodsFor:'documentation'! |
10910 !Image class methodsFor:'documentation'! |
10911 |
10911 |
10912 version |
10912 version |
10913 ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.204 1997-06-24 19:39:45 cg Exp $' |
10913 ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.205 1997-06-24 19:47:31 cg Exp $' |
10914 ! ! |
10914 ! ! |
10915 Image initialize! |
10915 Image initialize! |