Added get/set pixel funcion for bounds checking.