>>> import cv2
>>> img = cv2.imread("messi5.jpg", cv2.CV_LOAD_IMAGE_COLOR)
>>> row, column, depth = img.shape
>>> row, column, depth
(308, 450, 3) # Dimension is right same as reported by mac
>>> row*column*depth
415800
>>> float(row*column*depth)/1024
406.0546875
我的mac报告大小不同: