Closed dzyla closed 6 years ago
got the same MemoryError here
This error is being thrown by the PIL library which this project uses - and apparently it can happen if you pass in a negative height or width value to the resize function. Please add the following line of code before line 66:
print w,h
and let me know what values are displayed. Also, if you can attach the image you are trying to use to this issue I will try to reproduce the problem at this end.
Hey, I wanted to use it on windows from console and this is what I got:
Reading tiles from '.\belly\'... Processed 34 tiles. Processing main image... Traceback (most recent call last): File ".\mosaic.py", line 221, in
mosaic(sys.argv[1], sys.argv[2])
File ".\mosaic.py", line 214, in mosaic
image_data = TargetImage(img_path).get_data()
File ".\mosaic.py", line 66, in get_data
large_img = img.resize((w, h), Image.ANTIALIAS)
File "C:\Python27\lib\site-packages\PIL\Image.py", line 1645, in resize
return self._new(self.im.resize(size, resample))
MemoryError
I don't know what is the reason, just saying.
Best, Dawid