Skip to content

Pre-chipped datasets: How to convert geotiff chips from 32 to 8 bits per band #1781

Answered by AdeelH
bitsandbricks asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, I was not aware of that limitation of PIL. I suppose we should use rasterio if the file is a TIFF.

You could try modifying the source to do that as a workaround if that's convenient for you. (A PR would be welcome as well!)

Another option would be to convert them to numpy arrays. You could write a simple script that reads in each image and saves it in the numpy file format.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@AdeelH
Comment options

Answer selected by bitsandbricks
@bitsandbricks
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants