private void CopyToXyzw(PixelArea <TPixel> area, int sourceX, int sourceY, int width, int height) { for (int y = 0; y < height; y++) { Span <TPixel> source = this.GetRowSpan(sourceX, sourceY + y); Span <byte> destination = area.GetRowSpan(y); Operations.ToRgba32Bytes(source, destination, width); } }
private void CopyFromXyzw(PixelArea <TPixel> area, int targetX, int targetY, int width, int height) { for (int y = 0; y < height; y++) { Span <byte> source = area.GetRowSpan(y); Span <TPixel> destination = this.GetRowSpan(targetX, targetY + y); Operations.PackFromRgba32Bytes(source, destination, width); } }