<div dir="ltr">Does using pyplot.imgread work?</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 8:27 AM, Henrique Almeida <span dir="ltr"><<a href="mailto:hdante.lnls@gmail.com" target="_blank">hdante.lnls@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Any help with this problem ?<br>
<div class="HOEnZb"><div class="h5"><br>
2016-04-27 11:35 GMT-03:00 Henrique Almeida <<a href="mailto:hdante.lnls@gmail.com">hdante.lnls@gmail.com</a>>:<br>
>  Hello, what's the current status on numpy for loading bit-arrays ?<br>
><br>
> I'm currently unable to correctly load black and white (1-bit) TIFF<br>
> images. Code example follows:<br>
><br>
> from PIL import Image<br>
> import numpy<br>
> from matplotlib import pyplot<br>
><br>
> img = Image.open('oi-00.tiff')<br>
> a = numpy.array(img)<br>
><br>
> ^ does not work for 1-bit TIFF images<br>
><br>
> PIL source shows that it incorrectly uses typestr == '|b1'. I tried to<br>
> change this to '|t1', but I get :<br>
><br>
> TypeError: data type "|t1" not understood<br>
><br>
> My goal is to make the above code to work for black and white TIFF<br>
> images the same way it works for grayscale images. Any help ?<br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="https://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</div></div></blockquote></div><br></div>