public final class AiImage extends Image
The Adobe Illustrator (AI) Image
Image
A base example of converting an AI file to the PDF file format. It just loads an existing AI file and explicitly saves one as a PDF file.
String inAiFilePath = "rect2_color.ai"; String outPdfFilePath = "rect2_color.ai_output.pdf"; // Load a regular AI file AiImage aiImage = (AiImage)Image.load(inAiFilePath); try { // Export the loaded AI file to the PDF file format with default options aiImage.save(outPdfFilePath, new PdfOptions()); } finally { aiImage.dispose(); }
Constructor and Description |
---|
AiImage() |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(AiLayerSection layer)
Adds the AI layer section.
|
void |
cacheData()
Caches the data and ensures no additional data loading will be performed from the underlying
P:Aspose.PSD.DataStreamSupporter.DataStreamContainer . |
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
AiDataSection |
getDataSection()
Gets the data section.
|
long |
getFileFormat()
Gets a value of file format
|
AiFinalizeSection |
getFinalizeSection()
Gets the finalize section.
|
AiHeader |
getHeader()
Gets the header.
|
int |
getHeight()
Gets the image height.
|
AiLayerSection[] |
getLayers()
Gets the layer sections.
|
AiSetupSection |
getSetupSection()
Gets the setup section.
|
int |
getVersion()
Gets the version of Adobe Illustrator format
|
int |
getWidth()
Gets the image width.
|
boolean |
isCached()
Gets a value indicating whether object's data is cached currently and no data reading is required.
|
void |
resize(int newWidth,
int newHeight,
ImageResizeSettings settings)
Resizes the image.
|
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image.
|
void |
rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
|
void |
setDataSection(AiDataSection value)
Gets the data section.
|
void |
setFinalizeSection(AiFinalizeSection value)
Gets the finalize section.
|
void |
setHeader(AiHeader value)
Gets the header.
|
void |
setPalette(IColorPalette palette,
boolean updateColors)
Sets the image palette.
|
void |
setSetupSection(AiSetupSection value)
Gets the setup section.
|
void |
setVersion(int value)
Gets the version of Adobe Illustrator format
|
canLoad, canLoad, canLoad, canLoad, canSave, create, create, create, getBackgroundColor, getBounds, getBufferSizeHint, getContainer, getDefaultOptions, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getInterruptMonitor, getOriginalOptions, getPalette, getProgressEventHandler, getProgressEventHandlerInfo, getProportionalHeight, getProportionalWidth, getSize, hasBackgroundColor, isAutoAdjustPalette, isUsePalette, load, load, load, load, load, load, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, save, save, save, save, setAutoAdjustPalette, setBackgroundColor, setBackgroundColor, setBufferSizeHint, setInterruptMonitor, setPalette
getDataStreamContainer, save, save, save, save, setDataStreamContainer
close, dispose, getDisposed
public final AiLayerSection[] getLayers()
Gets the layer sections.
Value: The layer sections.public long getFileFormat()
Gets a value of file format
getFileFormat
in class Image
public final int getVersion()
Gets the version of Adobe Illustrator format
Value: The version.public final void setVersion(int value)
Gets the version of Adobe Illustrator format
Value: The version.public final AiHeader getHeader()
Gets the header.
Value: The header.public final void setHeader(AiHeader value)
Gets the header.
Value: The header.public final AiSetupSection getSetupSection()
Gets the setup section.
Value: The setup section.public final void setSetupSection(AiSetupSection value)
Gets the setup section.
Value: The setup section.public final AiFinalizeSection getFinalizeSection()
Gets the finalize section.
Value: The finalize section.public final void setFinalizeSection(AiFinalizeSection value)
Gets the finalize section.
Value: The finalize section.public final AiDataSection getDataSection()
Gets the data section.
Value: The data section.public final void setDataSection(AiDataSection value)
Gets the data section.
Value: The data section.public boolean isCached()
Gets a value indicating whether object's data is cached currently and no data reading is required.
Value:true
if object's data is cached; otherwise, false
.isCached
in class DataStreamSupporter
public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.getBitsPerPixel
in class Image
public int getWidth()
Gets the image width.
Value: The image width.getWidth
in interface IObjectWithBounds
getWidth
in class Image
public int getHeight()
Gets the image height.
Value: The image height.getHeight
in interface IObjectWithBounds
getHeight
in class Image
public void cacheData()
Caches the data and ensures no additional data loading will be performed from the underlying P:Aspose.PSD.DataStreamSupporter.DataStreamContainer
.
cacheData
in class DataStreamSupporter
com.aspose.ms.System.NotImplementedException
- Not Implementedpublic void resize(int newWidth, int newHeight, int resizeType)
Resizes the image.
public void resize(int newWidth, int newHeight, ImageResizeSettings settings)
Resizes the image.
public void rotateFlip(int rotateFlipType)
Rotates, flips, or rotates and flips the image.
rotateFlip
in class Image
rotateFlipType
- Type of the rotate flip.com.aspose.ms.System.NotImplementedException
- Not Implementedpublic void setPalette(IColorPalette palette, boolean updateColors)
Sets the image palette.
setPalette
in class Image
palette
- The palette to set.updateColors
- if set to true
colors will be updated according to the new palette; otherwise color indexes remain unchanged. Note that unchanged indexes may crash the image on loading if some indexes have no corresponding palette entries.com.aspose.ms.System.NotImplementedException
- Not Implementedpublic final void addLayer(AiLayerSection layer)
Adds the AI layer section.
layer
- The AI layer section.