import cv2 import numpy as np img = cv2.imread('ao.png', cv2.IMREAD_COLOR) orgHeight, orgWidth = img.shape[:2] size = (orgHeight/4, orgWidth/4) #Create Half Size Image #halfImg = cv2.resize(img, (orgHeight / 2, orgWidth / 2)) halfImg = cv2.resize(img, size) #Create 2 times big Image cv2.imwrite('ao.png', halfImg)
画像サイズを小さくしたいのですがエラーが出てきてできません
どこを直せば良いでしょうか
File "size.py", line 6, in <module> orgHeight, orgWidth = img.shape[:2] AttributeError: 'NoneType' object has no attribute 'shape'
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。