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

Animated gif #49

Closed
bampakoa opened this issue Sep 25, 2015 · 8 comments
Closed

Animated gif #49

bampakoa opened this issue Sep 25, 2015 · 8 comments
Labels

Comments

@bampakoa
Copy link

Hi,

I am using imagemin as a plugin with gulp and tried to compress an animated gif but it failed. Does it support the particular format?

Thanks

@kohler
Copy link
Owner

kohler commented Sep 25, 2015

This is not an issue with gifsicle. You should report it to gulp and/or imagemin first.

@bampakoa
Copy link
Author

@kohler I reported it to the other repos that you mentioned (maybe accidentally, because I could not figure out what was the correct repo to report it) but they redirected me to this one. Nevertheless, I would appreciate it if you could tell if there is any known problem with animated files.
If not, I could provide you with the exact error message and the gif file in case you can help with the issue.

Thanks

@kohler
Copy link
Owner

kohler commented Sep 25, 2015

The exact error message and gif file are required for a decent bug report, yes! :) Otherwise no way for me to know.

@bampakoa
Copy link
Author

events.js:85
      throw er; // Unhandled 'error' event
        ^
Error: write EOF
at exports._errnoException (util.js:746:11)
at WriteWrap.afterWrite (net.js:775:14)

loading

@kohler
Copy link
Owner

kohler commented Sep 28, 2015

In order for me to help fix the problem, you need to give enough detail that I can understand the problem and reproduce it. A web search for “how to write a bug report” should help you. In this case:

  1. Find a GIF causes no problems before it is processed by gifsicle. Call that gif unoptimized.gif. Attach the GIF. Say exactly how you can tell that this GIF causes no problems. Do not cut and paste a Javascript fragment from unidentified code; that is useless to me. Tell me how to reproduce. “Go to web site X and upload the GIF. The GIF will be uploaded.” or “View the GIF in Safari. It looks OK.”
  2. Transform the GIF using gifsicle to an optimized version. Tell me exactly what gifsicle command line you used, and which version number of gifsicle. Attach the optimized GIF. Say exactly how you can tell that this GIF causes a problem. Tell me how to reproduce the problem.

@bampakoa
Copy link
Author

I am using:

  • gulp 3.9.0
  • gulp-load-plugins 1.0.0-rc.1
  • gulp-cache 0.3.0
  • gulp-imagemin 2.3.0

to execute the following command from a gulp file

var gulp = require('gulp');
var plug = require('gulp-load-plugins')();

 gulp
    .src(/* the path of my gif image*/)
    .pipe(plug.cache(plug.imagemin({
    optimizationLevel: 3
})))

and I get the above error. The attached image is the source gif that causes me trouble.

Thanks

@kohler kohler added the invalid label Sep 28, 2015
@kohler
Copy link
Owner

kohler commented Sep 28, 2015

I do not maintain gulp, gulp-load-plugins, gulp-cache, or gulp-imagemin. I maintain gifsicle. A good bug report would mention only gifsicle: What is the gifsicle command line that produces an incorrect image?

Your gulpfile is not valid; it has no default task. Also gulp-load-plugins did not work. I had to learn gulp syntax to make the following gulpfile.

var gulp = require('gulp');
var cache = require('gulp-cache');
var imagemin = require('gulp-imagemin');

gulp.task("default", function () {
   return gulp
    .src("/home/kohler/ass.gif")
    .pipe(imagemin({
        optimizationLevel: 3
    }))
    .pipe(gulp.dest("dest"));
});

With this gulpfile I can process your image with no problem. Run on the command line Gifsicle reports

gifsicle: While reading '/home/kohler/ass.gif' frame #12:
gifsicle:   warning: trailing garbage after GIF ignored

which indicates a problem with the input GIF, but this warning does not affect its operation, or the operation of imagemin.

So this bug is invalid. If you have an ACTUAL GIFSICLE PROBLEM, you may report that problem in a new issue. It should be an ACTUAL GIFSICLE PROBLEM, in which gifsicle is at fault, with an ACTUAL GIFSICLE COMMAND LINE. Not some massive pile of gulp.

@bampakoa
Copy link
Author

Ok, I can see your point. Thanks anyway for the help and sorry for bothering you with no reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants