void
optimize_fragments(Gif_Stream *gfs, int optimize_flags, int huge_stream)
{
  if (!initialize_optimizer(gfs))
    return;

  create_subimages(gfs, optimize_flags, !huge_stream);
  create_out_global_map(gfs);
  create_new_image_data(gfs, optimize_flags);

  finalize_optimizer(gfs, optimize_flags);
}
Beispiel #2
0
void
optimize_fragments(Gif_Stream *gfs, int optimize_flags, int huge_stream)
{
    if (!initialize_optimizer(gfs))
        return;
    if ((unsigned) all_colormap->ncol >= 0xFFFF) {
        create_subimages32(gfs, optimize_flags, !huge_stream);
        create_out_global_map32(gfs);
        create_new_image_data32(gfs, optimize_flags);
        finalize_optimizer_data32();
    } else {
        create_subimages16(gfs, optimize_flags, !huge_stream);
        create_out_global_map16(gfs);
        create_new_image_data16(gfs, optimize_flags);
        finalize_optimizer_data16();
    }
    finalize_optimizer(gfs, optimize_flags);
}