public static void exportAllAsGIF(final AbstractZyGraph<?, ?> zygraph, final String filename)
      throws IOException {
    final y.io.GIFIOHandler gif = new y.io.GIFIOHandler();
    gif.setAntialiasingEnabled(true);

    final Graph2DView view = zygraph.getView();
    exportGraphToImageFileFormat(
        view.getGraph2D(), gif, filename, gif.createDefaultGraph2DView(view.getGraph2D()));
  }
Exports a graph to a GIF file.

@param zygraph The graph to export.
@param filename The name of the JPEG file.
@throws IOException Thrown if saving the file fails.
java/zylib/src/main/java/com/google/security/zynamics/zylib/yfileswrap/gui/zygraph/GraphExporters.java