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

Publish gif encoder to npm? #32

Open
mattbierner opened this issue May 27, 2020 · 2 comments
Open

Publish gif encoder to npm? #32

mattbierner opened this issue May 27, 2020 · 2 comments
Assignees

Comments

@mattbierner
Copy link

Hey Joao, nice work on gifcap! I have a few project that need to save gifs from user generated content and it seems like gifcap's encoder has the best performance of the ones I've tested and also produces by far the best looking gifs. Do you have any plans to publish the encoder part of this project so that others could also benefit from it?

If not, any objections to me bundling up the the encoder and publishing it to npm?

@joaomoreno
Copy link
Owner

joaomoreno commented May 27, 2020

Yeah the encoder is pretty kick ass, thanks! I can look into publishing it. For now, do you mind inlining it in your projects, until I get it into npm?

@joaomoreno joaomoreno self-assigned this May 27, 2020
@mattbierner
Copy link
Author

Thanks. Inlining the encoder works fine so no rush publishing to nom (I'll include a link the readme for my project back to gifcap).

Here's the (potentially incorrect) d.ts file I've been using to support using the encoder from TypeScript:

declare class GifEncoder {
    constructor(options: {
        width: number,
        height: number
    });

    dispose(): void;

    on(channel: 'progress', callback: (progress: number) => void): void;
    once(channel: 'finished', callback: (blob: Blob) => void): void;

    abort(): void;
    render(): void;

    addFrame(imageData: ImageData, delay: number): void;
}

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

2 participants