| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Other possible options for handling 16 bit images:
|
Sorry, something went wrong.
|
I like the idea of pil_to_array returning a 16 bit array when the input image is 16-bit. It allows the caller to deal with downsampling to 8-bit in the most appropriate way. We can update the docstring to indicate that the dtype of the output depends on the input file or some such. I think it's reasonable to make small backward-incompatible changes like this on master (just add to the changelog). While we're at it, can we add a test for this? Showing that a 16-bit input image is correctly returned as a 16-bit array? |
Sorry, something went wrong.
There was a problem hiding this comment.
Could this be turned into an image comparison test to ensure that the fields of the image are correctly read in, endianness works etc. Or if that's not practical, maybe assert about a few of the data values?
Sorry, something went wrong.
|
I have one small note about testing. This doesn't (I believe) change the fact that PNG images read through the _png extension (i.e. not through PIL) are still converted to 8-bit. We should fix that as well. |
Sorry, something went wrong.
|
I don't think all of these changes can go into v1.1.x. Not flipping PIL images or allowing 16 bit images might break existing applications. The _png extension should be fixed in another PR. It is currently broken in master (test_png .py fails). |
Sorry, something went wrong.
|
I agree this shouldn't be on 1.1.x, but it should get merged into master. I've added an issue #915 to track adding 16-bit support to the _png extension. As far as I can tell, the test_png.py failure is currently obsolete -- it is passing on master now. I think the following would make this mergeable:
|
Sorry, something went wrong.
|
@cgohlke -- it looks like your fork of matplotlib has been removed, making it impossible for me to review this pull request. Any idea what might have happened? |
Sorry, something went wrong.
|
I was able to get the diff manually from here: https://github.com/matplotlib/matplotlib/pull/616.diff so all is not lost -- I should be able to verify and merge this by hand. |
Sorry, something went wrong.
|
Merged into master |
Sorry, something went wrong.
|
Thanks. My matplotlib fork got corrupted. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
http://sourceforge.net/mailarchive/message.php?msg_id=28520067