public void Copy(RGBImage rgbImage) { RGB24 * p = rgbImage.Data(0, 0); ARGB32 *pOut = data; for (int i = 0; i < width * height; i++) { pOut->A = 255; pOut->R = p->R; pOut->G = p->G; pOut++->B = p++->B; } }
public void CopyRectangle(RGBImage rgbImage, int startX, int startY, int w, int h) { RGB24 * pOrig = rgbImage.Data(0, 0); ARGB32 *pOutOrig = data; RGB24 * p; ARGB32 *pOut; for (int j = startY; j < h; j++) { for (int i = startX; i < w; i++) { p = pOrig + j * rgbImage.Width + i; pOut = pOutOrig + j * width + i; pOut->A = 255; pOut->R = p->R; pOut->G = p->G; pOut->B = p->B; } } }