Depth8Image.st
changeset 7518 de8364635170
parent 7496 b13b7aa23e62
child 7524 780f829a2e1f
--- a/Depth8Image.st	Tue Aug 30 16:06:16 2016 +0200
+++ b/Depth8Image.st	Tue Aug 30 16:06:47 2016 +0200
@@ -76,6 +76,8 @@
 
 pixelAtX:x y:y
     "retrieve a pixel at x/y; return a pixelValue.
+     The interpretation of the returned value depends on the photometric
+     and the colormap. See also Image>>atX:y:)
      Pixels start at x=0 , y=0 for upper left pixel, end at
      x = width-1, y=height-1 for lower right pixel"
 
@@ -110,6 +112,8 @@
 
 pixelAtX:x y:y put:aPixelValue
     "set the pixel at x/y to aPixelValue.
+     The interpretation of the pixelValue depends on the photometric
+     and the colormap. (see also: Image>>atX:y:put:)
      Pixels start at x=0 , y=0 for upper left pixel, end at
      x = width-1, y=height-1 for lower right pixel"
 
@@ -123,13 +127,13 @@
     if (__isByteArrayLike(b)
      && __bothSmallInteger(x, y)
      && __bothSmallInteger(w, aPixelValue) ) {
-	int _idx;
+        int _idx;
 
-	_idx = (__intVal(w) * __intVal(y)) + __intVal(x);
-	if ((unsigned)_idx < __byteArraySize(b)) {
-	    __ByteArrayInstPtr(b)->ba_element[_idx] = __intVal(aPixelValue);
-	    RETURN( self );
-	}
+        _idx = (__intVal(w) * __intVal(y)) + __intVal(x);
+        if ((unsigned)_idx < __byteArraySize(b)) {
+            __ByteArrayInstPtr(b)->ba_element[_idx] = __intVal(aPixelValue);
+            RETURN( self );
+        }
     }
 %}.
     "fall back code for nonByteArray or nonInteger arguments"