Skip to content

Support for 16bits unsigned images #28

@Nunkiii

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

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