break;
}
String ref = null;
if (hasMask) {
// if the mask is binary then we could convert it into a bitmask
BitmapImage fopimg = new BitmapImage("TempImageMask:"
+ img.toString(), buf.getWidth(),
buf.getHeight(), mask, null);
fopimg.setColorSpace(new PDFColorSpace(PDFColorSpace.DEVICE_GRAY));
PDFXObject xobj = pdfDoc.addImage(resourceContext, fopimg);
ref = xobj.referencePDF();
if (outputStream != null) {
try {
this.pdfDoc.output(outputStream);
} catch (IOException ioe) {
// ignore exception, will be thrown again later
}
}
} else {
mask = null;
}
BitmapImage fopimg = new BitmapImage("TempImage:"
+ img.toString(), buf.getWidth(),
buf.getHeight(), result, ref);
fopimg.setTransparent(new PDFColor(255, 255, 255));
imageInfo = pdfDoc.addImage(resourceContext, fopimg);
//int xObjectNum = imageInfo.getXNumber();
if (outputStream != null) {
try {