public final class MIExporter
extends java.lang.Object
| Constructor and Description |
|---|
MIExporter()
A default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Explicitly destroys the data
|
static void |
exportJPEG(MIImage image,
float compression,
int resolution,
java.io.OutputStream dataStream)
Exports the image into the JPEG file
|
static void |
exportJPEG(MIImage image,
float compression,
java.io.OutputStream dataStream)
Exports the image into the JPEG file
|
static void |
exportPDF(MIImage image,
java.lang.String contentCreator,
java.lang.String pdfProducer,
java.io.OutputStream dataStream)
Exports an image as a single-page PDF document.
|
void |
exportPDFPage(MIImage image)
Exports an image as a page into multi-page PDF file.
|
static void |
exportPNG(MIImage image,
int resolution,
java.io.OutputStream dataStream)
Exports the image into the PNG file
|
static void |
exportPNG(MIImage image,
java.io.OutputStream dataStream)
Exports the image into the PNG file
|
protected void |
finalize() |
void |
finishExportingPDFPages()
Finishes export a batch of images into multi-page PDF file.
|
java.io.OutputStream |
getOutputStream()
Returns the current output stream
|
static MIImage |
importJPEG(java.io.InputStream dataStream)
Imports an input JPEG file into the
MIImage object |
void |
startExportingPDFPages(java.lang.String contentCreator,
java.lang.String pdfProducer,
java.io.OutputStream dataStream)
Creates a new PDF document with the provided metadata (the image creator and so on) and
starts exporting a batch of images into the specified multi-page PDF file.
|
public void destroy()
public void startExportingPDFPages(java.lang.String contentCreator,
java.lang.String pdfProducer,
java.io.OutputStream dataStream)
throws MIGenericException
exportPDFPage method for each exporting image.
After export completion, call the finishExportingPDFPages method.contentCreator - - The string with the name of the image creatorpdfProducer - - The string with the PDF file producerdataStream - - The output data streamMIGenericExceptionpublic void exportPDFPage(MIImage image) throws MIGenericException
startExportingPDFPages method to start export into multi-page PDF file.
After export completion, call the finishExportingPDFPages method.image - - The MIImage object containing an exporting imageMIGenericExceptionpublic void finishExportingPDFPages()
throws MIGenericException,
java.io.IOException
startExportingPDFPages method.
To add page into PDF file, call the exportPDFPage method for each exporting image.MIGenericExceptionjava.io.IOExceptionpublic java.io.OutputStream getOutputStream()
public static MIImage importJPEG(java.io.InputStream dataStream) throws MIGenericException, java.io.IOException
MIImage objectdataStream - - The data stream with an input JPEG dataMIImage object with the JPEG file dataMIGenericExceptionjava.io.IOExceptionpublic static void exportJPEG(MIImage image, float compression, java.io.OutputStream dataStream) throws MIGenericException, java.io.IOException
image - - The MIImage object containing an exporting imagecompression - - The image compression level. The value should be in the range from 0 to 1dataStream - - The output data streamMIGenericExceptionjava.io.IOExceptionpublic static void exportJPEG(MIImage image, float compression, int resolution, java.io.OutputStream dataStream) throws MIGenericException, java.io.IOException
image - - The MIImage object containing an exporting imagecompression - - The image compression level. The value should be in the range from 0 to 1resolution - - image resolution in dots per inch (DPI). The value should be in range from 1 to 65535.dataStream - - The output data streamMIGenericExceptionjava.io.IOExceptionpublic static void exportPNG(MIImage image, java.io.OutputStream dataStream) throws MIGenericException, java.io.IOException
image - - The MIImage object containing an exporting imagedataStream - - The output data streamMIGenericExceptionjava.io.IOExceptionpublic static void exportPNG(MIImage image, int resolution, java.io.OutputStream dataStream) throws MIGenericException, java.io.IOException
image - - The MIImage object containing an exporting imageresolution - - image resolution in dots per inch (DPI). The value should be in range from 1 to 65535.dataStream - - The output data streamMIGenericExceptionjava.io.IOExceptionpublic static void exportPDF(MIImage image, java.lang.String contentCreator, java.lang.String pdfProducer, java.io.OutputStream dataStream) throws MIGenericException, java.io.IOException
image - - The MIImage object containing an exporting imagecontentCreator - - The string with the name of the image creatorpdfProducer - - The string with the PDF file producerdataStream - - The output data streamMIGenericExceptionjava.io.IOExceptionprotected void finalize()
finalize in class java.lang.Object