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

gif support #166

Closed
ArmorDarks opened this issue Sep 13, 2016 · 9 comments
Closed

gif support #166

ArmorDarks opened this issue Sep 13, 2016 · 9 comments

Comments

@ArmorDarks
Copy link

Some people mentioned omggif

Any chances to see support of gifs in Jimp too?

@oliver-moran
Copy link
Collaborator

oliver-moran commented Oct 24, 2016

Thanks. Lots of potential there. Including exporting animated gifs. Will add to the road map.

And any contribution of code would naturally be welcome :-)

@aurium
Copy link
Contributor

aurium commented Nov 1, 2016

I believe this must be done by supporting multi layer images. At exporting we could do a GIF, an MNG... or export an multi layer format to another editor, like XCF, OpenRaster... or flatten all layers to a simple JPG or PNG.

@andreimcristof
Copy link

andreimcristof commented Nov 24, 2016

is there an ETA for this issue? we need the .gif functionality, since we use this Jimp in production. Many thanks!

@iwsfg iwsfg mentioned this issue Jan 30, 2017
@slidenerd
Copy link

Perhaps you may find it useful to generate GIFS with the gifencoder and JIMP

var GIFEncoder = require('gifencoder');
var Jimp = require('jimp');
var fs = require('fs');

var encoder = new GIFEncoder(320, 240);
// stream the results as they are available into myanimated.gif 
encoder.createReadStream().pipe(fs.createWriteStream('myanimated.gif'));

encoder.start();
encoder.setRepeat(0);   // 0 for repeat, -1 for no-repeat 
encoder.setDelay(500);  // frame delay in ms 
encoder.setQuality(10); // image quality. 10 is default. 

// use node-canvas 
var image = new Jimp(320, 240, 0xff0000, function (err, image) {
    encoder.addFrame(image.bitmap.data)
    // use node-canvas 
    var image = new Jimp(320, 240, 0x00ff00, function (err, image) {
        encoder.addFrame(image.bitmap.data)
        // use node-canvas 
        var image = new Jimp(320, 240, 0x0000ff, function (err, image) {
            encoder.addFrame(image.bitmap.data)
            encoder.finish()
        });
    });
})

@jtlapp
Copy link

jtlapp commented Dec 20, 2017

I've created a library called gifwrap for working with single- and multi-frame GIFs and still allowing you to leverage Jimp for image manipulation.

@hipstersmoothie
Copy link
Collaborator

@jtlapp @ArmorDarks it seems like GIF support was added. Can you verify it does what you need?

@hipstersmoothie
Copy link
Collaborator

omggif is a dep already. if more features are needed new issues should be opened

@jtlapp
Copy link

jtlapp commented Aug 5, 2018

Ah, I see that Jimp now uses the omggif repo. When I was working with it last year, it was using a local copy.

if more features are needed new issues should be opened

Unless they belong in separate layer which can be implemented as an independent module.

In any case, I've gradually been rewriting Jimp methods for my own purposes at high performance, so I myself don't have any further need for Jimp.

@hipstersmoothie
Copy link
Collaborator

hipstersmoothie commented Aug 5, 2018 via email

This issue was closed.
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

7 participants