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

Support for 16bits unsigned images #28

Open
Nunkiii opened this issue Jun 24, 2017 · 1 comment
Open

Support for 16bits unsigned images #28

Nunkiii opened this issue Jun 24, 2017 · 1 comment

Comments

@Nunkiii
Copy link

Nunkiii commented Jun 24, 2017

Salut,
There is a problem for loading unsigned 16 bits images ( BITPIX = 16 and BZERO = 32768)
This is the fix to handle them correctly :

in Image.prototype._getFrame :

Line 760:
change
...
case 16:
tmp = new Int16Array(buffer);
...
with
...
case 16:
if(bzero==32768)
tmp = new Uint16Array(buffer);
else
tmp = new Int16Array(buffer);
...

Thanks for your nice work!
Pierre

@T0T4R4
Copy link

T0T4R4 commented Mar 13, 2019

Is there no-one to implement this fix ?

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

No branches or pull requests

2 participants