public static byte[] encodeGif(BufferedImage image) throws IOException {
  ByteArrayOutputStream out=new ByteArrayOutputStream();
  if (Debug.debugging("acmegifhelper")) {
    Debug.output("Got output stream..." + out);
  }
  Acme.JPM.Encoders.GifEncoder enc=new Acme.JPM.Encoders.GifEncoder(image,out);
  if (Debug.debugging("acmegifhelper")) {
    Debug.output("Got gif encoder...");
  }
  enc.encode();
  if (Debug.debugging("acmegifhelper")) {
    Debug.output("encoded?");
  }
  return out.toByteArray();
}

public static byte [ ] encodeGif ( BufferedImage image ) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; if ( Debug . debugging ( "acmegifhelper" ) ) { Debug . output ( "Got output stream..." + out ) ; } Acme . JPM . Encoders . GifEncoder enc = new Acme . JPM . Encoders . GifEncoder ( image , out ) ; if ( Debug . debugging ( "acmegifhelper" ) ) { Debug . output ( "Got gif encoder..." ) ; } enc . encode ( ) ; if ( Debug . debugging ( "acmegifhelper" ) ) { Debug . output ( "encoded?" ) ; } return out . toByteArray ( ) ; }
return a byte array that contains the gif encoded image .
