SetPixel method that does not leak.