</BUG>
if (bi == null)
bi = new BufferedImage(pic.getWidth(), pic.getHeight(), BufferedImage.TYPE_3BYTE_BGR);
if (rgb == null)
<BUG>rgb = Picture.create(pic.getWidth(), pic.getHeight(), RGB);

transform.transform(pic, rgb);
AWTUtil.toBufferedImage(rgb, bi);
</BUG>
ImageIO.write(bi, "png", new File(format(cmd.getArg(1), i++)));

decoder.decode(inFrame.getData());
} catch (AssertionError ae) {
ae.printStackTrace(System.err);
continue;
}
Picture8Bit pic = decoder.getPicture8Bit();
if (bi == null)
bi = new BufferedImage(pic.getWidth(), pic.getHeight(), BufferedImage.TYPE_3BYTE_BGR);
if (rgb == null)
rgb = Picture8Bit.create(pic.getWidth(), pic.getHeight(), RGB);
transform.transform(pic, rgb);
rgbToBgr.transform(rgb, rgb);
AWTUtil.toBufferedImage8Bit(rgb, bi);
ImageIO.write(bi, "png", new File(format(cmd.getArg(1), i++)));
