--- a/Image.st Wed Aug 01 13:00:39 2001 +0200
+++ b/Image.st Wed Aug 01 16:32:44 2001 +0200
@@ -5117,6 +5117,7 @@
width := aRectangle width.
height := aRectangle height.
bytes := ByteArray uninitializedNew:(self bytesPerRow * height).
+ depth := self depth.
bitsPerSample := self bitsPerSample.
bitsPerPixel := self bitsPerPixel.
samplesPerPixel := self samplesPerPixel.
@@ -5130,29 +5131,29 @@
((photometric == anImage photometric)
and:[self bitsPerPixel = anImage bitsPerPixel
and:[colorMap = anImage colorMap]]) ifTrue:[
- "/ can do it by value
- anImage
- valuesFromX:xL y:yT toX:xR y:yB
- do:[:x :y :pixelValue |
- self pixelAtX:x-xL y:y-yT put:pixelValue.
- ]
+ "/ can do it by value
+ anImage
+ valuesFromX:xL y:yT toX:xR y:yB
+ do:[:x :y :pixelValue |
+ self pixelAtX:x-xL y:y-yT put:pixelValue.
+ ]
] ifFalse:[
- "/ must do it by colors
- anImage
- colorsFromX:xL y:yT toX:xR y:yB
- do:[:x :y :clr |
- self colorAtX:x-xL y:y-yT put:clr.
- ]
+ "/ must do it by colors
+ anImage
+ colorsFromX:xL y:yT toX:xR y:yB
+ do:[:x :y :clr |
+ self colorAtX:x-xL y:y-yT put:clr.
+ ]
].
anImage mask notNil ifTrue:[
- anImage mask depth == 1 ifTrue:[
- maskClass := ImageMask
- ] ifFalse:[
- maskClass := anImage mask class.
- ].
- mask := maskClass new
- fromSubImage:anImage mask in:aRectangle
+ anImage mask depth == 1 ifTrue:[
+ maskClass := ImageMask
+ ] ifFalse:[
+ maskClass := anImage mask class.
+ ].
+ mask := maskClass new
+ fromSubImage:anImage mask in:aRectangle
].
"
@@ -12293,6 +12294,6 @@
!Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.306 2001-08-01 11:00:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Image.st,v 1.307 2001-08-01 14:32:44 cg Exp $'
! !
Image initialize!