ImageRawPNG png = (ImageRawPNG) image;
ImageInfo info = image.getInfo();
String imageDescription = info.getMimeType() + " " + info.getOriginalURI();
ImageEncoder encoder = new ImageEncoderPNG(png);
FormGenerator formGen = new ImageFormGenerator(form.getName(), imageDescription, info.getSize()
.getDimensionPt(), info.getSize().getDimensionPx(), encoder, png.getColorSpace(),
false);
formGen.generate(gen);
}