my own GetPixel and SetPixel code