when l try to crop an image l get this following error. here is my code. I don't understand the error since my image is in a good shape in png format. what's wrong ?
from __future__ import print_function
from wand.image import Image
f = 'image1.png'
with Image(filename=f) as img:
print('width =', img.width)
print('height =', img.height)
#left,top,right,bottom
x=img.crop(275, 347, 147, 239)
x.size
print(x.size)
l got this error
x=img.crop(275, 347, 147, 239)
File "/usr/local/lib/python2.7/dist-packages/wand/image.py", line 543, in wrapped
result = function(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/wand/image.py", line 1504, in crop
raise ValueError('image width cannot be zero')
ValueError: image width cannot be zero