Giter Club home page Giter Club logo

writegif's People

Contributors

brycebaril avatar kirbysayshi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

writegif's Issues

Image artifacting even just with readimage -> writegif no-op

It's hard for me to narrow down if this is a problem with writegif or with readimage, but I've noticed that while unaltered meatspace GIFs come out of readimage/writegif perfectly, a lot of other GIFs come through with strange pixel artifacting.

Simplest reproduction:

function makeDataUri(type, buffer) {
  return 'data:' + type + ';base64,' + buffer.toString('base64');
}

function imgTag(image) {
  return "<img src='" + makeDataUri("image/gif", image) + "' />";
}

// readimage/writegif no-op
function writegiftest(buffer, cb) {
  readimage(buffer, function (err, buf) { 
    writegif(buf, cb); 
  });
}

// Express.js route
app.get("/writegiftest", function (req, res) {
  fs.readFile("./gifs/example.gif", function (err, buffer) {

    if (err) {
      res.send(err);
      return;
    }

    writegiftest(buffer, function (err, image) {
      res.send(imgTag(image));
    });

});

You can see two examples below, one is a Photoshop-resized meatspace GIF, the other is just a GIF of Homer Simpson from GIS.

homer
homer-noop
ryan-thumb
ryan-thumb-noop

Segfault

Getting a segfault with Node 0.10.31, OSX 10.9.4, using the basic readimage + writegif example. Don't know if this is useful but here's the result from node-segfault-handler:

. . .
0 segfault_handler.node 0x0000000100afb49f _ZL16segfault_handleriP9__siginfoPv + 287
1 libsystem_platform.dylib 0x00007fff82ac35aa _sigtramp + 26
2 ??? 0x0000000000000008 0x0 + 8
3 node 0x00000001002293c0 _ZN2v88internal17BoundsCheckBbData10CoverCheckEPNS0_12HBoundsCheckEi + 192
4 node 0x00000001001f86e4 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 308
5 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
6 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
7 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
8 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
9 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
10 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
11 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
12 node 0x00000001001f8854 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEPNS0_11HBasicBlockEPNS0_16BoundsCheckTableE + 676
13 node 0x00000001001f7e55 _ZN2v88internal6HGraph30EliminateRedundantBoundsChecksEv + 229
14 node 0x00000001001f7d48 _ZN2v88internal6HGraph8OptimizeEPNS0_17SmartArrayPointerIcEE + 1192
15 node 0x000000010015d24a _ZN2v88internal18OptimizingCompiler13OptimizeGraphEv + 42
16 node 0x000000010015fa16 _ZN2v88internalL12GenerateCodeEPNS0_15CompilationInfoE + 134
17 node 0x000000010015e694 _ZN2v88internal8Compiler11CompileLazyEPNS0_15CompilationInfoE + 404
18 node 0x00000001002a5322 _ZN2v88internal10JSFunction16CompileOptimizedENS0_6HandleIS1_EENS0_9BailoutIdENS0_18ClearExceptionFlagE + 162
19 node 0x00000001003188e4 _ZN2v88internal36Runtime_CompileForOnStackReplacementENS0_9ArgumentsEPNS0_7IsolateE + 644
20 ??? 0x00001f7784e06362 0x0 + 34598190867298

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.