怎么把bufferedimage转成 gif文件,用JAI(Java Advanced Imaging API)

解决方案 »

  1.   

    没用过JAI,可能是这样吧    FileOutputStream out = new FileOutputStream("e:\\a.gif");
        JPEGEncodeParam param = new JPEGEncodeParam();
        param.setQuality(0.70f); 
        ImageEncoder encoder = ImageCodec.createImageEncoder("GIF", out, param);
        encoder.encode(image);
        out.flush();
        out.close();
      

  2.   

    因为,我一秒种内要怎么把几十个bufferedimage转成gif,所以,要很快的速度,转成别的格式也行,,不我知道转哪个格式快,
    我看了,JAI说明,JAI转换比较快,所以想JAI,
    不知道哪位仁兄用过JAI,能否给一个,DEMO