diegorep / pypng

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

pipscalez crashes for some (non-standard bit depth?) images. #39

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Problem appears to be related to non-standard bit depths:

$ ./png.py -T cs3n3p08 | ./pipscalez 1 2
?PNG

IHDR ????sBIT???BTraceback (most recent call last):
  File "./pipscalez", line 50, in <module>
    main(sys.argv)
  File "./pipscalez", line 47, in main
    return rescale(sys.stdin, sys.stdout, xf, yf)
  File "./pipscalez", line 38, in rescale
    w.write(out, iterscale())
  File "/Users/drj/pypng/code/png.py", line 623, in write
    nrows = self.write_passes(outfile, rows)
  File "/Users/drj/pypng/code/png.py", line 745, in write_passes
    for i,row in enumerate(rows):
  File "./pipscalez", line 34, in iterscale
    bigrow[i*planes+c::xf*planes] = channel
TypeError: must assign array (not "list") to slice

and with pamseq:

$ pamseq 1 7 | ./png.py | ./pipscalez 1 1 
?PNG

IHD?]?sBITq؂Traceback (most recent call last):
  File "./pipscalez", line 50, in <module>
    main(sys.argv)
  File "./pipscalez", line 47, in main
    return rescale(sys.stdin, sys.stdout, xf, yf)
  File "./pipscalez", line 38, in rescale
    w.write(out, iterscale())
  File "/Users/drj/pypng/code/png.py", line 623, in write
    nrows = self.write_passes(outfile, rows)
  File "/Users/drj/pypng/code/png.py", line 745, in write_passes
    for i,row in enumerate(rows):
  File "./pipscalez", line 34, in iterscale
    bigrow[i*planes+c::xf*planes] = channel
TypeError: must assign array (not "list") to slice

Original issue reported on code.google.com by d...@pobox.com on 31 Mar 2009 at 3:02

GoogleCodeExporter commented 8 years ago

Original comment by d...@pobox.com on 31 Mar 2009 at 3:14