public class DjvuPage extends RasterCachedImage
Djvu page class
| Modifier and Type | Field and Description |
|---|---|
static com.aspose.ms.lang.Event<OnPageExportedAction> |
PageExportedAction
Occurs when [page exported action].
|
com.aspose.java.StdEvent<com.aspose.ms.System.ComponentModel.PropertyChangedEventArgs> |
PropertyChanged
Occurs when a property value changes.
|
| Modifier and Type | Method and Description |
|---|---|
DjvuRaster |
extractThumbnailImage()
Extracts the thumbnail image from the Djvu page.
|
DjvuRaster |
getBackgroundImage()
Gets the background image.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
DjvuRaster |
getForegroundImage()
Gets the foreground image for the page
|
DjvuRaster |
getForegroundImage(int subsample)
Gets the foreground image for the page
|
int |
getHeight()
Gets the height of the page
|
DjvuRaster |
getImage()
Gets the image.
|
int |
getPageNumber()
Gets the page number.
|
DjvuImage |
getParentImage()
Gets the parent image the page belongs to
|
String |
getTextForLocation(Rectangle rect)
Gets the text for the rectangle location
|
DjvuRaster |
getTextImage()
Gets the text image.
|
DjvuRaster |
getTextImage(int subsample)
Gets the text image.
|
DjvuRaster |
getThumbnailImage()
Gets or sets the thumbnail image for the page
|
int |
getWidth()
Gets the width of the page
|
boolean |
isColor()
Gets a value indicating whether this instance is color.
|
void |
setThumbnailImage(DjvuRaster value)
Gets or sets the thumbnail image for the page
|
adjustBrightness, adjustContrast, adjustGamma, adjustGamma, binarizeBradley, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, grayscale, isCached, resize, resize, rotate, rotateFlipcrop, dither, filter, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getHorizontalResolution, getImageOpacity, getModifyDate, getPixel, getPremultiplyComponents, getRawCustomColorConverter, getRawDataFormat, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getSkewAngle, getTransparentColor, getUpdateXmpData, getUseRawData, getVerticalResolution, getXmpData, hasAlpha, hasTransparentColor, isRawDataAvailable, isUsePalette, loadArgb32Pixels, loadArgb64Pixels, loadCmyk32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, loadRawData, normalizeAngle, normalizeAngle, readArgb32ScanLine, readScanLine, replaceColor, replaceColor, replaceNonTransparentColors, replaceNonTransparentColors, rotate, saveArgb32Pixels, saveCmyk32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setHorizontalResolution, setPalette, setPixel, setPremultiplyComponents, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setTransparentColor, setTransparentColor, setUpdateXmpData, setUseRawData, setVerticalResolution, setXmpData, toBitmap, writeArgb32ScanLine, writeScanLinecanLoad, canLoad, canLoad, canLoad, canSave, create, create, create, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getDefaultOptions, getFileFormat, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProgressEventHandler, getProgressEventHandlerInfo, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setBufferSizeHint, setInterruptMonitor, setPalettegetDataStreamContainer, save, save, saveclose, dispose, getDisposedpublic static final com.aspose.ms.lang.Event<OnPageExportedAction> PageExportedAction
Occurs when [page exported action].
public final com.aspose.java.StdEvent<com.aspose.ms.System.ComponentModel.PropertyChangedEventArgs> PropertyChanged
Occurs when a property value changes.
public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.getBitsPerPixel in class Imagepublic DjvuImage getParentImage()
Gets the parent image the page belongs to
Value: The document.public int getWidth()
Gets the width of the page
Value: The width.getWidth in interface IObjectWithBoundsgetWidth in class Imagepublic int getHeight()
Gets the height of the page
Value: The height.getHeight in interface IObjectWithBoundsgetHeight in class Imagepublic DjvuRaster getImage()
Gets the image.
Value: The image.public DjvuRaster getThumbnailImage()
Gets or sets the thumbnail image for the page
Value: The thumbnail image.public void setThumbnailImage(DjvuRaster value)
Gets or sets the thumbnail image for the page
Value: The thumbnail image.public int getPageNumber()
Gets the page number.
Value: The page number.This example shows how to load a DJVU image from a file stream and print information about the pages.
String dir = "c:\\temp\\";
// Load a DJVU image from a file stream.
java.io.FileInputStream stream = new java.io.FileInputStream(dir + "sample.djvu");
try {
com.aspose.imaging.fileformats.djvu.DjvuImage djvuImage = new com.aspose.imaging.fileformats.djvu.DjvuImage(stream);
try {
System.out.println("The total number of pages: " + djvuImage.getPages().length);
System.out.println("The active page number: " + djvuImage.getActivePage().getPageNumber());
System.out.println("The first page number: " + djvuImage.getFirstPage().getPageNumber());
System.out.println("The last page number: " + djvuImage.getLastPage().getPageNumber());
for (com.aspose.imaging.fileformats.djvu.DjvuPage djvuPage : djvuImage.getPages()) {
System.out.println("--------------------------------------------------");
System.out.println("Page number: " + djvuPage.getPageNumber());
System.out.println("Page size: " + djvuPage.getSize());
System.out.println("Page raw format: " + djvuPage.getRawDataFormat());
}
} finally {
djvuImage.dispose();
}
} finally {
stream.close();
}
//The output may look like this:
//The total number of pages: 2
//The active page number: 1
//The first page number: 1
//The last page number: 2
//--------------------------------------------------
//Page number: 1
//Page size: { Width = 2481, Height = 3508}
//Page raw format: RgbIndexed1Bpp, used channels: 1
//--------------------------------------------------
//Page number: 2
//Page size: { Width = 2481, Height = 3508}
//Page raw format: RgbIndexed1Bpp, used channels: 1
public boolean isColor()
Gets a value indicating whether this instance is color.
Value:true if this instance is color; otherwise, false.public String getTextForLocation(Rectangle rect)
Gets the text for the rectangle location
rect - The location rect.public DjvuRaster getForegroundImage()
Gets the foreground image for the page
public DjvuRaster getForegroundImage(int subsample)
Gets the foreground image for the page
subsample - The subsample.public DjvuRaster getTextImage()
Gets the text image.
public DjvuRaster getTextImage(int subsample)
Gets the text image.
subsample - The subsample.public DjvuRaster getBackgroundImage()
Gets the background image.
public DjvuRaster extractThumbnailImage()
Extracts the thumbnail image from the Djvu page.
Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.