Skip to content

Transparency Bug #40

@savaonepunch

Description

@savaonepunch

Im trying to create gifs into jimp images then back into gifs. It works fine on some gifs but on some i get this weird bug: https://imgur.com/a/IlRYSLG

This is how I'm doing it:

GifUtil.read(file).then(inputGif => {
    inputGif.frames.forEach((frame, i) => {
        // create a Jimp containing a clone of the frame bitmap
        jimpCopied = GifUtil.copyAsJimp(Jimp, frame);

        Promise.all([jimpCopied, maskP]).then(function(images) {
            var lenna = images[0];
            //var mask = images[1];

            //lenna
            //.greyscale()
            //.mask(mask, 0, 0);
            const fCopied = new GifFrame(new BitmapImage(lenna.bitmap))
            frames.push(fCopied);
            GifUtil.write("my-creation.gif", frames, {
                loops: 0
            }).then(gif => {
                console.log("written");
            });

        });

    })

})

Sorry if its some limitation i missed.

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