Remove function ValidImageRange because it is useless