add file range support to context loadImage method