[GSAS-II] Bug report: Incorrect handling of PIL Image objects
Gleb Dovjenko
dovjenko.g at gmail.com
Sat Jun 27 19:03:45 CDT 2020
Dear Colleagues,
I found a small bug in TIF_ReaderClass.Reader function. To reproduce it
just open the image from the attachment by doing "Import / Image / from
TIF image file". This image was not created by a detector directly, but
made from a detector-produced .h5 file for convenience.
When TIF_ReaderClass.Reader is called, GetTifData function fails on
it (imports/G2img_1TIF.py line 68), then the image is correctly opened with
PIL, but on lines 86 and 87 .shape property is called on a PIL.Image
object, which it does not have. If I insert a line
self.Image.shape = self.Image.size
on line 75, everything works fine (I used this hack because there are a few
.shape calls down the line and this is an easy way to check if they are the
only issue, and they are).
Thank you and best regards,
Gleb Dovzhenko.
lab6_00001_Frame_00001.tif
<https://drive.google.com/file/d/1UgSZCUuiHAN9XX7uAOa4QzjhtvnAoDBE/view?usp=drive_web>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.aps.anl.gov/pipermail/gsas-ii/attachments/20200628/63773f58/attachment.html>
More information about the GSAS-II
mailing list