Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GifFrame constructor ignores options from BitmapImages #27

Open
DetachHead opened this issue Feb 4, 2021 · 1 comment
Open

GifFrame constructor ignores options from BitmapImages #27

DetachHead opened this issue Feb 4, 2021 · 1 comment

Comments

@DetachHead
Copy link

would be good to be able to read and write frame delay, as Omggif supports it

@DetachHead
Copy link
Author

DetachHead commented Feb 4, 2021

nevermind, turns out it's in GifFrame and was losing the GifFrameOptions here in my code

frames = image.frames.map(frame =>
    new GifFrame(
        (GifUtil.copyAsJimp(Jimp, frame) as Jimp).scaleToFit(maxSize, maxSize).bitmap,
        frame
    )
)

because of this check in its constructor:

image

is that meant to be there? there's no constructor type that would imply such behavior:

constructor(bitmap: JimpBitmap, options?: GifFrameOptions);
constructor(bitmapImage: BitmapImage, options?: GifFrameOptions);
constructor(width: number, height: number, buffer: Buffer, options?: GifFrameOptions);
constructor(width: number, height: number, backgroundRGBA?: number, options?: GifFrameOptions);
constructor(frame: GifFrame);

@DetachHead DetachHead changed the title frame delay GifFrame constructor ignores options from BitmapImages Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant