Skip to content

BitmapData.alphaMask does not work in IE9 #1625

@mxmlbernard

Description

@mxmlbernard

Hi,

I am doing a puzzle game, where I load the image to reproduce & a serie of masks (in black and white) to apply for the pieces' shape.

The following snippet work as intended in all browsers but IE9 :

var bmd = game.make.bitmapData(330, 250);
var bmdMask = game.add.bitmapData(330, 250).load('mask1');
bmdMask.replaceRGB(255, 255, 255, 255, 0, 0, 0, 0, 255); // replace white by alpha = 0 for the mask
bmd.alphaMask('original', bmdMask);

In IE9, it just displays the original image in bmd. IE10 seems to work in my tests.
My investigations lead me that it would be setPixels32 that does not work correctly for IE9 : by displaying bmdMask in a sprite, it shows the white color instead of transparency.

NB : I tried the processPixelRGB API, with the same results.

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