# HG changeset patch # User Claus Gittinger # Date 1079789745 -3600 # Node ID 47f8b9588f175bcb55d1fe4ba1560814d57e68a9 # Parent eedeb5ed8e91a06ea6e5d27b17166310cdfa6d36 rgb diff -r eedeb5ed8e91 -r 47f8b9588f17 Depth24Image.st --- a/Depth24Image.st Sat Mar 20 14:28:14 2004 +0100 +++ b/Depth24Image.st Sat Mar 20 14:35:45 2004 +0100 @@ -88,13 +88,7 @@ gVal := bytes at:(index + 1). bVal := bytes at:(index + 2). - photometric ~~ #rgb ifTrue:[ - ^ super colorAtX:x y:y - ]. ^ Color redByte:rVal greenByte:gVal blueByte:bVal - - "Created: 24.4.1997 / 17:32:47 / cg" - "Modified: 24.4.1997 / 21:32:37 / cg" ! colorAtX:x y:y put:aColor @@ -152,6 +146,13 @@ "Created: 24.4.1997 / 17:06:33 / cg" ! +rgbValueAtX:x y:y + "retrieve a pixels rgb value at x/y; return a 24bit rgbValue (rrggbb, red is MSB). + Pixels start at 0@0 for upper left pixel, end at (width-1)@(height-1) for lower right pixel." + + ^ self pixelAtX:x y:y. +! + rowAt:y putAll:pixelArray startingAt:startIndex "store a single rows bits from bits in the pixelArray argument; Return the pixelArray. @@ -3002,6 +3003,12 @@ ^ -16 ! +rgbFromValue:pixelValue + "given a pixel value, return the corresponding 24bit rgbValue (rrggbb, red is MSB)." + + ^ pixelValue +! + samplesPerPixel "return the number of samples per pixel in the image." @@ -3018,5 +3025,5 @@ !Depth24Image class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.82 2003-07-04 14:19:27 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/Depth24Image.st,v 1.83 2004-03-20 13:35:45 cg Exp $' ! !