Skip to content

Support for 16bits unsigned images #28

Open

Description

@Nunkiii

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

Activity

  1. T0T4R4 commented on Mar 13, 2019

    @T0T4R4

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions