我试图将图片显示为底片,并对其进行了编码,但它不会将图片显示为底片,是不是我做错了什么? for px in getPixels(picButterfly1): green=getGreen(px) negColor=makeColor(255-red, 255-green, 255-blue)另外,我如何绘制水平线?谢谢!
我需要写一个函数spin(pic,x),它将拍摄一张照片,并将其逆时针旋转90度X次。我在一个函数中只有90度顺时针旋转: width = getWidth(pic) new = makeEmptyPicture(height,width) for x in range(0,width): for y in range(0,height):
p = getPixel(pic,x,y)
我需要做一个函数,将复制一个图像,但镜像。我创建了镜像的代码,但它不工作,我不知道为什么,因为我跟踪了代码,它应该镜像镜像。代码如下: width = getWidth(picture) for x in range(0, width): targetPixel = getPixel(picture, width - x - 1, heig