How to resize an image using imageio?
问题 Consider an image img of type imageio.core.util.Array . The shape of img is (256, 256, 3) . I want to resize it to (128, 128, 3) . I tried at least the following three: img.resize(img_res, pilmode="RGB") img.resize(img_res) img = cv2.resize(img, self.img_res) Here img_res = (128, 128) . None of them worked well. How can I resize my image to the desired size? 回答1: According to the documentation on imageio.core.util.Array, Array is "a subclass of np.ndarray [...]". Thus, when calling resize on