reading tiff data and get the max in the stack