fix image height width calculate