Skip to content

[Bug] Different behaviour between TS and AS #326

Closed
@LinusU

Description

@LinusU

I'm currently in the process of porting my BMP decoding library from JS to AS, and I have a version that is compiling with both tsc and asc at the moment. Everything works when using the output from tsc, but when using the output from asc I'm running into a strange decoding artifact.

The code is in this branch: https://github.com/LinusU/decode-bmp/tree/wasm

For some reason, the decoded file comes out as this when using the output from asc:

foobar9000

The tsc version correctly decodes the image like this:

w3c_home

I'm using the branch with the changes in #316, so potentially something in the DataView is wrong. But since the metadata (magic byte, width, height, color depth, header size) is correct, and that is the only part read with DataView, I think that the problem is elsewhere.

I'll continue to investigate to pin down the exactly where the problem is, but wanted to open early to hopefully get some help getting in the right direction ☺️

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