satyarth / pixelsort

Pixel sorting images in python.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when trying to pixelsort vertically

abetusk opened this issue · comments

commented
$ python3 pixelsort.py -a 90 examples/file.png 
Interval function:  threshold
Lower threshold:  0.25
Upper threshold:  0.8
Randomness:  0 %
Opening image...
Converting to RGBA...
Rotating image...
Getting data...
Getting pixels...
Determining intervals...
Defining intervals...
Sorting pixels...
Placing pixels in output image...
Rotating output image back to original orientation...
Crop image to apropriate size...
Saving image...
Traceback (most recent call last):
  File "pixelsort.py", line 56, in <module>
    main()
  File "pixelsort.py", line 50, in main
    output_img.save(argparams.output_image_path)
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 1646, in save
    self.load()
  File "/usr/lib/python3/dist-packages/PIL/Image.py", line 1961, in load
    self.im = self.im.crop(self.__crop)
TypeError: integer argument expected, got float

Thanks for making an issue, I'll fix this in a bit :)

commented

Made an issue so I could reference it in the pull request.

commented

Thank you! It's an awesome tool and I love it!