Skip to content

Masking an animated GIF loaded with loadImage() not working. #5174

@sandersturing

Description

@sandersturing

When loading an animated gif with loadImage() and applying a mask, the image is not masked. Doing the same thing with a still image obviously works:

Example in online editor

Good to add that there seems to be some inconsistency with how different browsers behave (which I could not reproduce myself):

Steps to reproduce:

  • Load any animated GIF image (in preload, with loadImage)
  • Load an image used as a mask
  • Apply the mask to the animated GIF
  • Display the animated GIF

Expected:

  • The animated GIF should be masked out using the applied mask

Result:

  • The animated GIF shows as is. Masks are however applied on static images (JPG, PNG) using the same code.

Thing I tried:

  • re-applying the mask every frame before the image is being displayed
  • Using different GIFS (different sizes, lengths etc.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions