-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failures on big-endian architecture (s390x) #545
Comments
As a quick hack, I confirmed that hard-coding TAGS["RowsPerStrip"]["type"] = ctypes.c_uint32 at the end of The exception is |
Thanks for the report. I'll get to work on it. |
Thanks! Please let me know if I can do anything to help. |
This API call can be problematic if the tag has more that one possible datatype on a platform that is hard to test, say a big endian platform. Get around this by using the IFD as read via programming to the TIFF spec. Refactor, pass image width, height to readRGBAImage instead of using TIFFGetFieldDefaulted. Closes: #545
Using TIFFFieldDatatype is tougher than it looks. I elected on doing this another way, and just bypass LibTIFF when retrieving the tag values. I already had a platform-independent way of getting all the tags for the purposes of creating a UUID box to preserve the original value of all the tags, and that should work here as well. |
Thanks! This seems logical, and I can confirm that it fixes this bug. I still have one test failure on |
While trying to update the
python-glymur
package in Fedora Linux from 0.9.6, I found there are some test failures related to the newtiff2jp2k
tool ons390x
—Fedora Linux’s sole big-endian architecture.It looks like, in each of these,
rps
(read from theRowsPerStrip
field), is zero. I think this is because the field is actually 32-bit instead of 16-bit in this test (“LONG
”) instead of (“SHORT
”), and reading a 16-bit value is getting only the top half of the word on big-endian platforms.It seems like either type is allowed for this field, and a library should use
libtiff
’sTIFFFieldDataType
to see which is in use.This should probably be handled automatically and generally in
glymur.lib.tiff.getFieldDefaulted()
. I’ll probably offer a PR if I have some time to work on it.The text was updated successfully, but these errors were encountered: