public abstract class MetafileOptions extends ImageOptionsBase implements com.aspose.fileformats.core.imageoptions.ICompressOptions
The Metafiles base options.
Modifier and Type | Method and Description |
---|---|
boolean |
getCompress()
Gets a value indicating whether this
##Aspose#FileFormats#Core#ImageOptions is compressed. |
void |
setCompress(boolean value)
Sets a value indicating whether this
##Aspose#FileFormats#Core#ImageOptions is compressed. |
deepClone, getBufferSizeHint, getFullFrame, getMultiPageOptions, getPalette, getProgressEventHandler, getResolutionSettings, getSource, getVectorRasterizationOptions, getXmpData, setBufferSizeHint, setFullFrame, setMultiPageOptions, setPalette, setProgressEventHandler, setResolutionSettings, setSource, setVectorRasterizationOptions, setXmpData
close, dispose, getDisposed
public final boolean getCompress()
Gets a value indicating whether this ##Aspose#FileFormats#Core#ImageOptions
is compressed.
true
if compressed; otherwise, false
.getCompress
in interface com.aspose.fileformats.core.imageoptions.ICompressOptions
##Aspose#FileFormats#Core#ImageOptions
is compressed.public final void setCompress(boolean value)
Sets a value indicating whether this ##Aspose#FileFormats#Core#ImageOptions
is compressed.
true
if compressed; otherwise, false
.setCompress
in interface com.aspose.fileformats.core.imageoptions.ICompressOptions
value
- a value indicating whether this ##Aspose#FileFormats#Core#ImageOptions
is compressed.The following example shows how to convert a emf images to emz format
String file = "input.emf"; String baseFolder = "D:\\Compressed\\"; String inputFile = baseFolder + file; String outFile = inputFile + ".emz"; try (com.aspose.imaging.Image image = com.aspose.imaging.Image.load(inputFile)) { com.aspose.imaging.imageoptions.VectorRasterizationOptions vectorRasterizationOptions = new com.aspose.imaging.imageoptions.EmfRasterizationOptions(); vectorRasterizationOptions.setPageSize(com.aspose.imaging.Size.to_SizeF(image.getSize())); com.aspose.imaging.imageoptions.EmfOptions options = new com.aspose.imaging.imageoptions.EmfOptions(); options.setVectorRasterizationOptions(vectorRasterizationOptions); options.setCompress(true); image.save(outFile, options); }
Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.