Does any one know how to copy the pixel values from a DC to an Array quickly, and vice verca

Using the GetPixel and SetPixel functions with nested loops to cycle through all the values is too slow.