-
Notifications
You must be signed in to change notification settings - Fork 33
[Feature request] Add support for reading FixedPointNumbers #251
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
Comments
I agree that such a feature would be useful. However, there are a few problems. First, Secondly, I don't think it's a good idea to overload Perhaps we need to make a policy about #247 first, but I don't have a definite answer for that yet. |
With Btw, what is the UInt12 type? It doesn't seem to be a base Julia type. |
However, there is no API to specify the source (raw) type and the start bit. Probably, only "one"
Julia can't handle types with bit widths other than multiples of 8, so #247 includes the problem of how to define them. If you already have a good solution, then PR is welcome. |
Since Two stages are involved here: 1) read bit string as Hence currently it should be supported in downstream TiffImages to provide Maybe we should propose this |
Ah, I see the concern. I guess my vision was that, since there are only 12 information bits in
It assumes a 16-bit backing type, i.e. it's a wrapped |
You might want to create a |
It would be great if FixedPointNumbers could add support for the
read
function, i.e.read(io, N4f12)
, that would handle the padding and other issues. For example, given a 24-bit long stream, the output of the function would be a vector of twoN4f12
s.This recently came up in tlnagy/TiffImages.jl#58, but I feel like this package is a better home for such logic. I could make an attempt at an implementation if people feel like this is the best location for it.
The text was updated successfully, but these errors were encountered: