/** * Standard constructor for class <CODE>GIFEncoder</CODE>. Each array stores * intensity values for the image. In other words, <NOBR> * <CODE>r[x][y]</CODE></NOBR> refers to the red intensity of the pixel at * column <CODE>x</CODE>, row <CODE>y</CODE>. * * @param r * A 2-dimensional array containing the red intensity values. * @param g * A 2-dimensional array containing the green intensity values. * @param b * A 2-dimensional array containing the blue intensity values. * @exception AWTException * Thrown if the image contains more than 256 colors. */ public GIFEncoder(byte[][] r, byte[][] g, byte[][] b) throws AWTException { this.imageWidth = (short) (r.length); this.imageHeight = (short) (r[0].length); this.toIndexColor(r, g, b); } // ends constructor GIFEncoder(byte[][], byte[][], byte[][])
this.toIndexColor(r, g, b);