1 Reply Latest reply on May 21, 2007 9:31 PM by SunghyunWang_(bruce)

    [q] different color returned by getpixels()

    SunghyunWang_(bruce)
      Hello,

      There is something strange in the 'getpixels' funtion.

      I loaded an image and dumped each R,G,B color value
      but I found that the values are slightly different from those of the original one.
      (I dumped R,G,B values of each pixels by using my own C# program)

      Please look at my code snippet. Is there anything I should check?




      ...
      var imgarea:Rectangle = new Rectangle(0,0,bitmap.width,bitmap.height);
      var pixelarray:ByteArray = bitmap.bitmapData.getPixels( imgarea );

      ...
      for(var j:int=0; j<pixelarray.length; j++){
      if(j%4==0) continue;
      trace(pixelarray[j]);
      }