public abstract class ImageOptionsBase extends DisposableObject
The image base options.
Modifier and Type | Method and Description |
---|---|
ImageOptionsBase |
clone() |
ImageOptionsBase |
deepClone()
Clones this instance.
|
int |
getBufferSizeHint()
Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
|
String |
getDefaultReplacementFont()
Gets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system).
|
boolean |
getFullFrame()
Gets a value indicating whether [full frame].
|
MultiPageOptions |
getMultiPageOptions()
The multipage options
|
IColorPalette |
getPalette()
Gets or sets the color palette.
|
ProgressEventHandler |
getProgressEventHandler()
Gets or sets the progress event handler.
|
ResolutionSetting |
getResolutionSettings()
Gets or sets the resolution settings.
|
Source |
getSource()
Gets or sets the source to create image in.
|
VectorRasterizationOptions |
getVectorRasterizationOptions()
Gets or sets the vector rasterization options.
|
XmpPacketWrapper |
getXmpData()
Gets or sets the XMP metadata container.
|
void |
setBufferSizeHint(int value)
Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
|
void |
setDefaultReplacementFont(String value)
Gets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system).
|
void |
setFullFrame(boolean value)
Sets a value indicating whether [full frame].
|
void |
setMultiPageOptions(MultiPageOptions value)
The multipage options
|
void |
setPalette(IColorPalette value)
Gets or sets the color palette.
|
void |
setProgressEventHandler(ProgressEventHandler value)
Gets or sets the progress event handler.
|
void |
setResolutionSettings(ResolutionSetting value)
Gets or sets the resolution settings.
|
void |
setSource(Source value)
Gets or sets the source to create image in.
|
void |
setVectorRasterizationOptions(VectorRasterizationOptions value)
Gets or sets the vector rasterization options.
|
void |
setXmpData(XmpPacketWrapper value)
Gets or sets the XMP metadata container.
|
close, dispose, getDisposed
public String getDefaultReplacementFont()
Gets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system). To take proper name of default font can be used next code snippet: System.Drawing.Text.InstalledFontCollection col = new System.Drawing.Text.InstalledFontCollection(); System.Drawing.FontFamily[] families = col.Families; string defaultFontName = families[0].Name; PsdLoadOptions psdLoadOptions = new PsdLoadOptions() { DefaultReplacementFont = defaultFontName });
Value: The default replacement font.public void setDefaultReplacementFont(String value)
Gets or sets the default replacement font (font that will be used to draw text when exporting to raster, if existing layer font in PSD file is not presented in system). To take proper name of default font can be used next code snippet: System.Drawing.Text.InstalledFontCollection col = new System.Drawing.Text.InstalledFontCollection(); System.Drawing.FontFamily[] families = col.Families; string defaultFontName = families[0].Name; PsdLoadOptions psdLoadOptions = new PsdLoadOptions() { DefaultReplacementFont = defaultFontName });
Value: The default replacement font.This example demonstrates how to set a Default Replacement Font during saving the image. The program applies different default font replacements for different output files.
// Please, don't install Konstanting Font, because this test should replace font that is not installed String srcPsdPath = "sample_konstanting.psd"; String[] dstPaths = new String[] { "replacedfont0.tiff", "replacedfont1.png", "replacedfont2.jpg" }; // Load a PSD that require a font that is not installed PsdImage image = (PsdImage)Image.load(srcPsdPath); try { // This way you can use different fonts for different outputs image.save(dstPaths[0], new TiffOptions(TiffExpectedFormat.TiffJpegRgb)); PngOptions pngOptions = new PngOptions(); pngOptions.setDefaultReplacementFont("Verdana"); image.save(dstPaths[1], pngOptions); JpegOptions jpegOptions = new JpegOptions(); jpegOptions.setDefaultReplacementFont("Times New Roman"); image.save(dstPaths[2], jpegOptions); } finally { image.dispose(); }
public XmpPacketWrapper getXmpData()
Gets or sets the XMP metadata container.
Value: The XMP data container.public void setXmpData(XmpPacketWrapper value)
Gets or sets the XMP metadata container.
Value: The XMP data container.public final Source getSource()
Gets or sets the source to create image in.
Value: The source to create image in.public final void setSource(Source value)
Gets or sets the source to create image in.
Value: The source to create image in.public IColorPalette getPalette()
Gets or sets the color palette.
Value: The color palette.public void setPalette(IColorPalette value)
Gets or sets the color palette.
Value: The color palette.public ResolutionSetting getResolutionSettings()
Gets or sets the resolution settings.
public void setResolutionSettings(ResolutionSetting value)
Gets or sets the resolution settings.
public final VectorRasterizationOptions getVectorRasterizationOptions()
Gets or sets the vector rasterization options.
Value: The vector rasterization options.public final void setVectorRasterizationOptions(VectorRasterizationOptions value)
Gets or sets the vector rasterization options.
Value: The vector rasterization options.public final int getBufferSizeHint()
Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
Value: The buffer size hint, in megabytes. Non-positive value means no memory limitation for internal bufferspublic final void setBufferSizeHint(int value)
Gets or sets the buffer size hint which is defined max allowed size for all internal buffers.
Value: The buffer size hint, in megabytes. Non-positive value means no memory limitation for internal bufferspublic final MultiPageOptions getMultiPageOptions()
The multipage options
public final void setMultiPageOptions(MultiPageOptions value)
The multipage options
public final boolean getFullFrame()
Gets a value indicating whether [full frame].
Value:true
if [full frame]; otherwise, false
.public final void setFullFrame(boolean value)
Sets a value indicating whether [full frame].
Value:true
if [full frame]; otherwise, false
.value
- a value indicating whether [full frame].public final ProgressEventHandler getProgressEventHandler()
Gets or sets the progress event handler.
Value: The progress event handler.public final void setProgressEventHandler(ProgressEventHandler value)
Gets or sets the progress event handler.
Value: The progress event handler.public ImageOptionsBase clone()
public ImageOptionsBase deepClone()
Clones this instance.