我无法将我的 CGI 图片和小插图个人资料图像放在一起制作小插图图片,其中图片边缘的图片稍微较暗,而不会影响其他任何地方的图像,到目前为止,我认为是是的,但我的图片在中间显示为暗,而不是正常显示图像,但边缘颜色稍暗。
这是我目前拥有的:
def main():
inputPic = makePicture(pickAFile())
vignette = makePicture(pickAFile())
addVignette(inputPic, vignette)
def addVignette(inputPic, vignette):
if getWidth(inputPic) == getWidth(vignette) and getHeight(inputPic) == getHeight(vignette):
explore(inputPic)
explore(vignette)
px1 = getPixels(inputPic)
px2 = getPixels(vignette)
for px in getPixels(inputPic):
x = getX(px)
y = getY(px)
px2 = getPixelAt(vignette, x, y)
x2 = getX(px2)
y2 = getY(px2)
r1 = getRed(px)
r2 = getRed(px2)
g1 = getGreen(px)
g2 = getGreen(px2)
b1 = getBlue(px)
b2 = getBlue(px2)
newR = (r1-r2+104)
newG = (g1-g2+88)
newB = (b1-b2+48)
newC = makeColor(newR, newG, newB)
setColor(px, newC)
explore(inputPic)
folder = pickAFolder()
filename = requestString("enter file name: ")
path = folder+filename+".jpg"
writePictureTo(inputPic, path)
http://i.stack.imgur.com/PqW7K.jpg
图片1是图像需要的
http://i.stack.imgur.com/PtS4U.jpg
图 2 是我在编码结束时得到的图像
任何帮助我朝着正确的方向前进将不胜感激