image = ImageConverter.rescale(image, ((maxWidth > 0) ? maxWidth : width),
((maxHeight > 0) ? maxHeight : height));
CompositeBitmap compositeBitmap = CompositeBitmap.create(image, bpp);
String uri = file.toURI().toString();
home.addParagraph(2).addText(i + " ").addLinkStart(uri).addText(file.getName()).addLinkEnd();
String[] uris = new String[compositeBitmap.getRows()];
for (int j = 0, n = compositeBitmap.getRows(); j < n; j++) {
uris[j] = uri + "-" + j;
document.addRecord(new ImageRecord(uris[j], compositeBitmap.getBitmapAt(j, 0)));