--- a/Depth24Image.st Thu Feb 04 17:10:15 2016 +0100
+++ b/Depth24Image.st Thu Feb 04 17:10:23 2016 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
"
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
@@ -78,20 +76,21 @@
colorAtX:x y:y
"retrieve a pixel at x/y; return a color.
- Pixels start at x=0 , y=0 for upper left pixel, end at
- x = width-1, y=height-1 for lower right pixel"
+ Pixels start at x=0 , y=0 for upper left pixel,
+ end at x = width-1, y=height-1 for lower right pixel"
|index "{ Class: SmallInteger }"
rVal gVal bVal|
- photometric ~~ #rgb ifTrue:[^ super colorAtX:x y:y].
-
index := 1 + (((width * y) + x) * 3).
- rVal := bytes at:(index).
- gVal := bytes at:(index + 1).
- bVal := bytes at:(index + 2).
-
- ^ Color redByte:rVal greenByte:gVal blueByte:bVal
+ photometric == #rgb ifTrue:[
+ rVal := bytes at:(index).
+ gVal := bytes at:(index + 1).
+ bVal := bytes at:(index + 2).
+ ^ Color redByte:rVal greenByte:gVal blueByte:bVal
+ ].
+ "/ the inherited method should handle all cases.
+ ^ super colorAtX:x y:y.
!
colorAtX:x y:y put:aColor
@@ -3119,10 +3118,10 @@
!Depth24Image class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.98 2015-02-27 13:48:04 cg Exp $'
+ ^ '$Header$'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.98 2015-02-27 13:48:04 cg Exp $'
+ ^ '$Header$'
! !