0
所以我想拼接一个图像到两个,为此我编写了这个代码。拼接带有魔杖的图像,python不起作用
from wand.image import Image
from wand.display import display
with Image(filename="test.png") as im :
im.trim(color=None,fuzz=0)
x,y = im.size
xh,yh = int(x/2),int(y/2)
print(x,y,xh,yh)
im1 = im[0:xh,0:y]
print(im1.size)
display(im1)
图像的大小是(1156,242),因此拼接图像应该是(578242),但它是(553235)来代替。有人知道为什么Here is the test image.
This Worked。谢谢。 –