Closed GoogleCodeExporter closed 9 years ago
I wrote a patch to read group4 binary images... it might not work for other
compression schemes, and gives an image with inverted colors.
Original comment by vcha...@gmail.com
on 6 Nov 2011 at 12:33
Attachments:
It works for my images! Thanks for the patch!
Original comment by rangoni....@gmail.com
on 6 Nov 2011 at 4:55
Even if it does not provide complete support for 1bit images
(no write support, the returned array is actually 8 bit array
because numpy does not have int1 type available)
I have applied the patch (with slight modification) to svn repo
because the patch is simple and it works for some applications.
Original comment by pearu.peterson
on 6 Nov 2011 at 8:46
There is no int1 type available, but there is numpy.bool for binary vectors...
Original comment by vcha...@gmail.com
on 6 Nov 2011 at 9:03
Sure, but numpy.bool has 8 bits, not 1, and thus it is equivalent to numpy.int8.
This makes writing numpy.bool arrays as 1 bit arrays tricky (need to use
bittools extension module to convert 8bit arrays to 1bit arrays before calling
WriteStrip).
Original comment by pearu.peterson
on 6 Nov 2011 at 9:25
Original issue reported on code.google.com by
rangoni....@gmail.com
on 11 Mar 2011 at 4:07