def image_get_height(filename): with open(filename, 'rb') as image_file: image_data = image_file.read() width, height, filetype = get_size(image_data) return height