Skip to content

Bitmap.prototype.getAlphaPixel return the wrong type #107

@niokasgami

Description

@niokasgami

Hello,
I noticed meanwhile working on the typescript conversion I noticed that
Bitmap.prototype.getAlphaPixel is supposed to return a String although my linter show it's return an Uint8ClampedArray

wich is making the documentation wrong.

I suggest for fix this to either change the return type from the comment from String to Uint8ClampedArray or to do this :

    Bitmap.prototype.getAlphaPixel = function(x,  y) {
        var data = this._context.getImageData(x, y, 1, 1).data;
        return data[3].toString();
    };

thanks for your time!

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