If cropping area exceeds the tile,code updated to handle the situation