--- a/ImageRdr.st Tue Apr 22 19:36:11 1997 +0200
+++ b/ImageRdr.st Tue Apr 22 19:37:58 1997 +0200
@@ -1635,11 +1635,16 @@
!ImageReader methodsFor:'image reading'!
buildMaskFromColor:maskPixelValue
+ "helper for image formats, where an individual pixel value
+ has been defined as a mask-pixel (i.e. GIF).
+ Creates a maskImage, with zeros at positions where the image
+ has the given pixelValue; all other mask pixels are set to 1."
+
|maskArray bytesPerMaskRow|
bytesPerMaskRow := (width+7) // 8.
- maskArray := ByteArray new:bytesPerMaskRow * height.
+ maskArray := ByteArray uninitializedNew:bytesPerMaskRow * height.
%{
int __w = __intVal(__INST(width));
@@ -1712,7 +1717,7 @@
}
fail: ;
%}.
- mask := Depth1Image width:width height:height fromArray:maskArray.
+ mask := ImageMask width:width height:height fromArray:maskArray.
"Created: 21.6.1996 / 11:43:47 / cg"
@@ -1750,5 +1755,5 @@
!ImageReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Attic/ImageRdr.st,v 1.43 1997-04-10 15:46:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Attic/ImageRdr.st,v 1.44 1997-04-22 17:37:58 cg Exp $'
! !
--- a/ImageReader.st Tue Apr 22 19:36:11 1997 +0200
+++ b/ImageReader.st Tue Apr 22 19:37:58 1997 +0200
@@ -1635,11 +1635,16 @@
!ImageReader methodsFor:'image reading'!
buildMaskFromColor:maskPixelValue
+ "helper for image formats, where an individual pixel value
+ has been defined as a mask-pixel (i.e. GIF).
+ Creates a maskImage, with zeros at positions where the image
+ has the given pixelValue; all other mask pixels are set to 1."
+
|maskArray bytesPerMaskRow|
bytesPerMaskRow := (width+7) // 8.
- maskArray := ByteArray new:bytesPerMaskRow * height.
+ maskArray := ByteArray uninitializedNew:bytesPerMaskRow * height.
%{
int __w = __intVal(__INST(width));
@@ -1712,7 +1717,7 @@
}
fail: ;
%}.
- mask := Depth1Image width:width height:height fromArray:maskArray.
+ mask := ImageMask width:width height:height fromArray:maskArray.
"Created: 21.6.1996 / 11:43:47 / cg"
@@ -1750,5 +1755,5 @@
!ImageReader class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/ImageReader.st,v 1.43 1997-04-10 15:46:29 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/ImageReader.st,v 1.44 1997-04-22 17:37:58 cg Exp $'
! !