Skip to content

DecodeBboxInt doesn't seem to work properly when bitDepth is odd #12

@danielgn91

Description

@danielgn91

Let's say bitDepth = 39
The javascript code:
var step = bitDepth / 2;
actually assigns the value 19.5 in the variable step
The C# code:
var step = bitDepth / 2; doesn't because both bitDepth and 2 are integers and that is an integer division.
This causes an error in the for loop and in the values passed to DecodeBit:
(step - i) * 2 - 1 and (step - i) * 2 - 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions