diegorep / pypng

Automatically exported from code.google.com/p/pypng
0 stars 0 forks source link

pipdither fail with 1-bit input. #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$ ./png.py -T basn0g01 | ./pipdither              
Traceback (most recent call last):
  File "./pipdither", line 163, in <module>
    main()
  File "./pipdither", line 159, in main
    return dither(sys.stdout, f, **k)
  File "./pipdither", line 72, in dither
    sourcef = 1.0/sourcemaxval
ZeroDivisionError: float division

Original issue reported on code.google.com by d...@pobox.com on 24 Apr 2009 at 9:03

GoogleCodeExporter commented 8 years ago
It turns out that this bug is also responsible for fails at any other bit 
depths, apart from 2 and 4.

Fixed by r145

Original comment by d...@pobox.com on 24 Apr 2009 at 9:25