kohler / gifsicle

Create, manipulate, and optimize GIF images and animations
http://www.lcdf.org/gifsicle/
GNU General Public License v2.0
3.79k stars 241 forks source link

[Help document bug] For gifsicle, the help document misses some options #187

Open ccccmd opened 1 year ago

ccccmd commented 1 year ago

The "--help" option of gifsicle misses some options "gray", "ignore-errors", "nextfile", "resize-geometry" for version 1.93.

For the option "gray", the following code appears during option parsing and calls the MARK_CH, Gif_DeleteColormap, set_new_fixed_colormap in src/gifsicle.c:1930-1932 for version 1.93.

      MARK_CH(output, CH_USE_COLORMAP);
      Gif_DeleteColormap(def_output_data.colormap_fixed);
      set_new_fixed_colormap("gray");

For the option "ignore-errors", the following code appears during option parsing and modifies the no_ignore_errors in src/gifsicle.c:2096 for version 1.93.

      no_ignore_errors = clp->negated;

For the option "nextfile", the following code appears during option parsing and modifies the gif_read_flags, nextfile in src/gifsicle.c:2114-2119 for version 1.93.

      if (clp->negated)
        gif_read_flags &= ~GIF_READ_TRAILING_GARBAGE_OK;
      else {
        gif_read_flags |= GIF_READ_TRAILING_GARBAGE_OK;
        nextfile = 1;
      }

For the option "resize-geometry", the following code appears during option parsing and calls the MARK_CH, parse_resize_geometry_opt and modifies the def_output_data.scaling in src/gifsicle.c:2057-2062 for version 1.93.

      MARK_CH(output, CH_RESIZE);
      if (clp->negated)
        def_output_data.scaling = GT_SCALING_NONE;
      else
        parse_resize_geometry_opt(&def_output_data, clp->val.s, clp);
      break;

But it does not appear in the document provided by "--help".

It may prevent users from using the relevant function.