Restrict index not be greater than row_size in TIFF_PredictLine