question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support getBandInformation in PILFileTileSource

See original GitHub issue

It would be great if PILFileTileSource could implement the same getBandInformation as GDALFileTileSource. For example, I want to extract general band info from a JPEG image. rasterio lets me do this (though it throws warnings), but large_image does not. Well really, I just want to know the “interpretation” of each band (not any stats) and that’s all that rasterio will return.

Could PILFileTileSource implement getBandInformation in a way that simply returns the interpretations? e.g. “red”, “blue”, “green”, “grey”, etc.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mantheycommented, Jul 7, 2021
0reactions
mantheycommented, Jul 6, 2021

Indeed. You’d have to know that mode maps to the bands in the PIL. getInternalMetadata is the catch-all for known metadata. As another function that is the wrong choice, the histogram function returns a histogram per band (so the length of its output would tell you the number of bands).

I’ll get to this soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found