Skip to content

Bigendian Fixes#388

Merged
wiredfool merged 12 commits intopython-pillow:masterfrom
wiredfool:bigendian
Oct 22, 2013
Merged

Bigendian Fixes#388
wiredfool merged 12 commits intopython-pillow:masterfrom
wiredfool:bigendian

Conversation

@wiredfool
Copy link
Copy Markdown
Member

Fixes for images on bigendian machines. Fixes #385

  • Image formats were incorrect for I;16 for converting to numpy.
  • That exposed issues where tiffs from libtiff were put in native byte order, and native tiffs were in image byte order.
  • Save tests were failing due to metadata issues, which are also fixed. Probably fixes Save RGB Tiff using LibTiff raises exception #387, needs tests for that.

Undone, and worth checking out in the future: I;32 and F;16/32 formats, as well as I;16S.

@manisandro
Copy link
Copy Markdown
Member

Thanks a lot for looking at this! Could you also add the new test images?

  • Tests/images/12bit.deflate.tif
  • Tests/images/12bit.MM.deflate.tif
  • Tests/images/12bit.MM.cropped.tif

Also, I get before the test summary:

=== remaining temporary files
/tmp/pillow-tests/temp_file_libtiff_0.png
/tmp/pillow-tests/temp_file_libtiff_4.tif
/tmp/pillow-tests/temp_file_libtiff_2.png
/tmp/pillow-tests/temp_file_libtiff_6.tif
/tmp/pillow-tests/temp_file_libtiff_3.png
/tmp/pillow-tests/temp_file_tiff_0.tif
/tmp/pillow-tests/temp_file_libtiff_5.png
/tmp/pillow-tests/temp_file_libtiff_1.png

@wiredfool
Copy link
Copy Markdown
Member Author

The images should have been added in 1945fec. I'm guessing that the remaining temp files might be from missing that.

@manisandro
Copy link
Copy Markdown
Member

Hmpf sorry, somehow missed that.

@manisandro
Copy link
Copy Markdown
Member

Hurray, builds successful on all Fedora arches. Thanks again!

wiredfool added a commit that referenced this pull request Oct 22, 2013
@wiredfool wiredfool merged commit 9f6c465 into python-pillow:master Oct 22, 2013
@wiredfool
Copy link
Copy Markdown
Member Author

Yay! Thanks for the acct on the ppc machine.

@wiredfool wiredfool mentioned this pull request Oct 22, 2013
@wiredfool wiredfool deleted the bigendian branch October 22, 2013 23:08
@hugovk hugovk added the Big-endian Big-endian processors label Dec 18, 2019
radarhere pushed a commit to radarhere/Pillow that referenced this pull request Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Big-endian Big-endian processors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Save RGB Tiff using LibTiff raises exception bug: tobytes() byteorder with multibyte samples, bigendian

3 participants