顾名思义,既然是Buffer当然就跟缓冲器有关

解决方案 »

  1.   

    如何开大用于生成图文件的这个Buffer的大小?
    可不可以做所谓的双缓冲?
    怎么实现?
      

  2.   

    public BufferedImage(int width,
                         int height,
                         int imageType)Constructs a BufferedImage of one of the predefined image types. The ColorSpace for the image is the default sRGB space. Parameters:
    width - width of the created image
    height - height of the created image
    imageType - type of the created image
    See Also:
    ColorSpace, TYPE_INT_RGB, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_GRAY, TYPE_USHORT_GRAY, TYPE_BYTE_BINARY, TYPE_BYTE_INDEXED, TYPE_USHORT_565_RGB, TYPE_USHORT_555_RGB--------------------------------------------------------------------------------
      

  3.   

    双缓冲原理就是利用BufferedImage的
      

  4.   

    我就是这样写的:
    BufferedImage bi = new BufferedImage(52000 ,300,  BufferedImage.TYPE_BYTE_INDEXED);        结果就是:
    报错:
    Exception in thread "main" java.lang.OutOfMemoryError
            <<no stack trace available>>如果我必须生成这么大的图片,应怎么处理