boolean hasAlpha = false;
if (gce != null && gce.transparency)
hasAlpha = true;
BufferedImage result = getBufferedImageFactory(params)
.getColorBufferedImage(width, height, hasAlpha);
{
int colorTable[];
if (id.localColorTable != null)
colorTable = getColorTable(id.localColorTable);
else if (imageContents.globalColorTable != null)
colorTable = getColorTable(imageContents.globalColorTable);
else
throw new ImageReadException("Gif: No Color Table");
int transparentIndex = -1;
if (hasAlpha)
transparentIndex = gce.transparentColorIndex;
int counter = 0;
int rowsInPass1 = (height + 7) / 8;
int rowsInPass2 = (height + 3) / 8;
int rowsInPass3 = (height + 1) / 4;
int rowsInPass4 = (height) / 2;
int[] db = result.getRaster().getDataBuffer();
for (int row = 0; row < height; row++)
{
int y;
if (id.interlaceFlag)