equal
deleted
inserted
replaced
135 byte := (byte bitAnd:16rF0) bitOr:aPixelValue |
135 byte := (byte bitAnd:16rF0) bitOr:aPixelValue |
136 ]. |
136 ]. |
137 bytes at:index put:byte |
137 bytes at:index put:byte |
138 |
138 |
139 "Created: 24.4.1997 / 17:06:39 / cg" |
139 "Created: 24.4.1997 / 17:06:39 / cg" |
|
140 ! |
|
141 |
|
142 rowAt:rowIndex into:aPixelBuffer |
|
143 "fill aBuffer with pixel values retrieved from a single row. |
|
144 Notice: rowIndex is 0-based." |
|
145 |
|
146 |lineIndex "{ Class: SmallInteger }" |
|
147 byte "{ Class: SmallInteger }" |
|
148 w "{ Class: SmallInteger }" |
|
149 pixel dstIdx| |
|
150 |
|
151 dstIdx := 1. |
|
152 w := width - 1. |
|
153 lineIndex := (self bytesPerRow * rowIndex). |
|
154 0 to:w do:[:x | |
|
155 x even ifTrue:[ |
|
156 lineIndex := lineIndex + 1. |
|
157 byte := bytes at:lineIndex. |
|
158 pixel := (byte bitShift:-4) bitAnd:16rF. |
|
159 ] ifFalse:[ |
|
160 pixel := byte bitAnd:16rF. |
|
161 ]. |
|
162 aPixelBuffer at:dstIdx put:pixel. |
|
163 dstIdx := dstIdx + 1 |
|
164 ]. |
|
165 |
|
166 "Created: 21.7.1997 / 18:04:00 / cg" |
|
167 "Modified: 21.7.1997 / 18:05:47 / cg" |
140 ! ! |
168 ! ! |
141 |
169 |
142 !Depth4Image methodsFor:'dither helpers'! |
170 !Depth4Image methodsFor:'dither helpers'! |
143 |
171 |
144 orderedDitheredGrayBitsWithDitherMatrix:ditherMatrix ditherWidth:dW depth:depth |
172 orderedDitheredGrayBitsWithDitherMatrix:ditherMatrix ditherWidth:dW depth:depth |
635 ! ! |
663 ! ! |
636 |
664 |
637 !Depth4Image class methodsFor:'documentation'! |
665 !Depth4Image class methodsFor:'documentation'! |
638 |
666 |
639 version |
667 version |
640 ^ '$Header: /cvs/stx/stx/libview/Depth4Image.st,v 1.25 1997-07-18 22:41:33 cg Exp $' |
668 ^ '$Header: /cvs/stx/stx/libview/Depth4Image.st,v 1.26 1997-07-21 16:07:37 cg Exp $' |
641 ! ! |
669 ! ! |