Fix the bug that miss rows and cols when showing image