Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added S to list of I;16 formats #1388

Closed
wants to merge 3 commits into from

Conversation

radarhere
Copy link
Member

Resolves #1244 - loading of I;16S images

There is a list of I;16 modes - I;16, I;16L, I;16B and I;16N. I presume that I;16S was simply forgotten in that list, rather than being excluded for any particular reason.

@wiredfool
Copy link
Member

I wouldn't be surprised if I;16S isn't fully baked. I know that there are no conversions from I;16S to anything else, and I don't think that there are actually any pixel access methods for it. I think basically the only thing that can be done with it is to offload to numpy/scipy.

@wiredfool wiredfool added this to the 3.0.0 milestone Sep 9, 2015
@wiredfool
Copy link
Member

We need to find a distributable I;16S image to test with, I think this might be a GIS image format.

@wiredfool
Copy link
Member

I'll look.

Fwiw, the signed modes are a pain because they are not really supported in the backend. Some operations may work, but anything dealing with pixel values is going to be broken. (And broken meaning that the results will be wrong, not that it will crash) There are really three options:

  • convert to unsigned for storage, use the signed formats only for reading and writing
  • write converters to and from signed so that we can store in signed, but can losslessly convert to do operations on the data.
  • push full signed access through.

@wiredfool
Copy link
Member

The access part is wrong, as it's returning a uint16, not an int16. Unpack is probably ok, but there's probably some issues related to endianness, either big, little or native. I think that in this case, it's probably going to wind up being native. There are existing unpack methods for all of the I;16*S methods -> I. There are some existing pack methods, but they don't cover all of the permutations.

I'm kind of thinking that the best move might be to make the I;16S modes store as I (aka, I32 or I32S), and leave out the I;16 storage for now.

@wiredfool wiredfool mentioned this pull request Sep 20, 2015
@radarhere radarhere removed this from the 3.0.0 milestone Oct 7, 2015
@homm
Copy link
Member

homm commented Sep 11, 2017

successor: #2577

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants