Print

Print


On Jun 23, 2015, at 12:14 PM, Williams, Stephanie <[log in to unmask]> wrote:
Thanks to Mike, I knew this was likely something to do with our JP2 library; I'm now pretty sure I've traced it back to a hard-coded frombuffer() setting--"L", for grayscale--in the NativeImaging module that Chronam uses to optimize image generation/broker image libraries.  I'm wary of the consequences of changing that, and will be investigating further.

Ah, this spot:

https://github.com/acdha/NativeImaging/blob/bad7425766bf1a4fd28452caf0afde9ab28d7a9d/NativeImaging/backends/aware.py#L220
https://github.com/acdha/NativeImaging/blob/bad7425766bf1a4fd28452caf0afde9ab28d7a9d/NativeImaging/backends/aware_cext.py#L105

That code was developed to support Chronicling America which at the time didnít have color content. It shouldnít be too invasive to do something like use the number of channels and bits-per-pixel values to select the mode from the list at http://pillow.readthedocs.org/en/latest/handbook/concepts.html#concept-modes. Unfortunately I donít easily have access to Aware to test this but if someone else does I can merge the change and push it out to PyPI quickly.

Chris