//--------------------------------------------------------------------- public void foreachPixel(onPixel fun) { for (int y = 0; y < height; ++y) { // ImageLine的Scanline出来的行数据,表示RGBA ImageLine pngLine = mPngReader.ReadRowInt(y); int[] pngLineArray = pngLine.Scanline; for (int x = 0; x < width; ++x) { fun(_isBlackColor(pngLineArray, x), x, y); } } }