public class Layer
extends com.aspose.imaging.RasterCachedImage
The psd layer.
Modifier and Type | Field and Description |
---|---|
static int |
BLEND_SIGNATURE
Represents blend mode signature.
|
static int |
LAYER_HEADER_SIZE
The layer header size.
|
Constructor and Description |
---|
Layer()
Initializes a new instance of the
Layer class. |
Modifier and Type | Method and Description |
---|---|
void |
checkAbilityExportToRaster_internalized()
Checks the ability export to raster current layer.
|
static Layer |
createInstance_internalized(com.aspose.imaging_internal.fileformats.psd.sections.PsdHeader header,
IColorPalette palette)
Creates the new instance of the
Layer class. |
void |
drawImage(Point location,
RasterImage image)
Draws the image on layer.
|
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
long |
getBlendModeKey()
Gets or sets the blend mode key.
|
int |
getBlendModeSignature()
Gets the blend mode signature.
|
int |
getBottom()
Gets or sets the bottom layer position.
|
int |
getBytesPerRow_internalized()
Gets the bytes per row.
|
int |
getBytesPerRow_internalized(int bitDepth)
Gets the bytes per row.
|
int |
getBytesPerRowForMask_internalized(int bitDepth)
Gets the bytes per row.
|
ChannelInformation[] |
getChannelInformation()
Gets or sets the channel information.
|
int |
getChannelsCount()
Gets the layer's channels count.
|
byte |
getClipping()
Gets or sets the layer clipping.
|
int |
getExtraLength()
Gets the layer extra information length in bytes.
|
byte |
getFiller()
Gets or sets the layer filler.
|
byte |
getFlags()
Gets or sets the layer flags.
|
com.aspose.imaging_internal.fileformats.psd.sections.PsdHeader |
getHeader_internalized()
Gets or sets the header.
|
int |
getHeight()
Gets the image height.
|
LayerBlendingRangesData |
getLayerBlendingRangesData()
Gets or sets the layer blending ranges data.
|
LayerMaskData |
getLayerMaskData()
Gets or sets the layer mask data.
|
PsdOptions |
getLayerOptions()
Gets the layer options.
|
IColorPalette |
getLayerPalette_internalized()
Gets or sets the layer palette.
|
int |
getLeft()
Gets or sets the left layer position.
|
int |
getLength()
Gets the overall layer length in bytes.
|
String |
getName()
Gets or sets the layer name.
|
byte |
getOpacity()
Gets or sets the layer opacity.
|
LayerResource[] |
getResources()
Gets or sets the layer resources.
|
int |
getRight()
Gets or sets the right layer position.
|
int |
getTop()
Gets or sets the top layer position.
|
int |
getWidth()
Gets the image width.
|
void |
initChannelsInfoDataForRawFormat_internalized()
Initializes the channels information data for raw format(used when psd is created from raw layers.
|
void |
save_internalized(com.aspose.imaging.StreamContainer streamContainer,
int psdVersion,
int bitDepth)
Saves data to the specified stream container.
|
void |
save_internalized(com.aspose.ms.System.IO.Stream stream,
ImageOptionsBase optionsBase,
Rectangle boundsRectangle) |
void |
save(String filePath,
boolean overWrite)
Saves the object's data to the specified file location.
|
void |
save(String filePath,
ImageOptionsBase options)
Saves the object's data to the specified file location in the specified file format according to save options.
|
void |
save(String filePath,
ImageOptionsBase options,
Rectangle boundsRectangle)
Saves the object's data to the specified file location in the specified file format according to save options.
|
void |
saveData(com.aspose.ms.System.IO.Stream stream)
Saves the data.
|
void |
setBlendModeKey(long value)
Gets or sets the blend mode key.
|
void |
setBottom(int value)
Gets or sets the bottom layer position.
|
void |
setChannelInformation(ChannelInformation[] value)
Gets or sets the channel information.
|
void |
setClipping(byte value)
Gets or sets the layer clipping.
|
void |
setFiller(byte value)
Gets or sets the layer filler.
|
void |
setFlags(byte value)
Gets or sets the layer flags.
|
void |
setHeader_internalized(com.aspose.imaging_internal.fileformats.psd.sections.PsdHeader value)
Gets or sets the header.
|
void |
setLayerBlendingRangesData(LayerBlendingRangesData value)
Gets or sets the layer blending ranges data.
|
void |
setLayerMaskData(LayerMaskData value)
Gets or sets the layer mask data.
|
void |
setLayerPalette_internalized(IColorPalette value)
Gets or sets the layer palette.
|
void |
setLeft(int value)
Gets or sets the left layer position.
|
void |
setName_internalized(String name)
Sets the layer name.
|
void |
setName(String value)
Gets or sets the layer name.
|
void |
setOpacity(byte value)
Gets or sets the layer opacity.
|
void |
setResources(LayerResource[] value)
Gets or sets the layer resources.
|
void |
setRight(int value)
Gets or sets the right layer position.
|
void |
setTop(int value)
Gets or sets the top layer position.
|
adjustBrightness, adjustContrast, adjustGamma, adjustGamma, beginResize_internalized, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, getFormatSpecificPalette_internalized, grayscale, isCached, resize, resize, rotate, rotateFlip, setFormatSpecificPalette_internalized
crop, dither, filter, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getHorizontalResolution, getPixel, getRawCustomColorConverter, getRawDataFormat, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getTransparentColor, getVerticalResolution, getXmpData, hasAlpha, hasTransparentColor, isRawDataAvailable, loadArgb32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, readScanLine, rotate, saveArgb32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setHorizontalResolution, setPalette, setPixel, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setTransparentColor, setTransparentColor, setVerticalResolution, setXmpData, writeScanLine
canLoad, canLoad, canLoad, canLoad, canLoadInternal_internalized, canLoadInternal_internalized, canSave, create, getBackgroundColor, getBounds, getContainer, getFileFormat, getFileFormat, getFileFormatInternal_internalized, getFittingRectangle, getFittingRectangle, getPalette, getProportionalHeight, getProportionalWidth, getSize, getVentureLicense_internalized, hasBackgroundColor, load, load, load, load, loadInternal_internalized, loadInternal_internalized, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save, save, save, setBackgroundColor, setBackgroundColor, setContainer_internalized, setPalette, setVentureLicense_internalized
getDataStreamContainer, save_internalized, save, save, setDataStreamContainer
close, dispose, getDisposed
public static final int LAYER_HEADER_SIZE
The layer header size.
public static final int BLEND_SIGNATURE
Represents blend mode signature.
public Layer()
Initializes a new instance of the Layer
class. Constructor for lazy initialization.
public LayerResource[] getResources()
Gets or sets the layer resources.
Value: The layer resources.public void setResources(LayerResource[] value)
Gets or sets the layer resources.
Value: The layer resources.public String getName()
Gets or sets the layer name.
Value: The layer name.public void setName(String value)
Gets or sets the layer name.
Value: The layer name.public int getTop()
Gets or sets the top layer position.
Value: The top layer position.public void setTop(int value)
Gets or sets the top layer position.
Value: The top layer position.public int getLeft()
Gets or sets the left layer position.
Value: The left layer position.public void setLeft(int value)
Gets or sets the left layer position.
Value: The left layer position.public int getBottom()
Gets or sets the bottom layer position.
Value: The bottom layer position.public void setBottom(int value)
Gets or sets the bottom layer position.
Value: The bottom layer position.public int getRight()
Gets or sets the right layer position.
Value: The right layer position.public void setRight(int value)
Gets or sets the right layer position.
Value: The right layer position.public int getChannelsCount()
Gets the layer's channels count.
Value: The layer's channels count.public ChannelInformation[] getChannelInformation()
Gets or sets the channel information.
Value: The channel information.public void setChannelInformation(ChannelInformation[] value)
Gets or sets the channel information.
Value: The channel information.public int getBlendModeSignature()
Gets the blend mode signature.
Value: The blend mode signature.public long getBlendModeKey()
Gets or sets the blend mode key.
Value: The blend mode key.public void setBlendModeKey(long value)
Gets or sets the blend mode key.
Value: The blend mode key.public byte getOpacity()
Gets or sets the layer opacity. 0 = transparent, 255 = opaque.
Value: The layer opacity.public void setOpacity(byte value)
Gets or sets the layer opacity. 0 = transparent, 255 = opaque.
Value: The layer opacity.public byte getClipping()
Gets or sets the layer clipping. 0 = base, 1 = non-base.
Value: The layer clipping.public void setClipping(byte value)
Gets or sets the layer clipping. 0 = base, 1 = non-base.
Value: The layer clipping.public byte getFlags()
Gets or sets the layer flags. bit 0 = transparency protected; bit 1 = visible; bit 2 = obsolete; bit 3 = 1 for Photoshop 5.0 and later, tells if bit 4 has useful information; bit 4 = pixel data irrelevant to appearance of document.
Value: The layer flags.public void setFlags(byte value)
Gets or sets the layer flags. bit 0 = transparency protected; bit 1 = visible; bit 2 = obsolete; bit 3 = 1 for Photoshop 5.0 and later, tells if bit 4 has useful information; bit 4 = pixel data irrelevant to appearance of document.
Value: The layer flags.public byte getFiller()
Gets or sets the layer filler.
Value: The layer filler.public void setFiller(byte value)
Gets or sets the layer filler.
Value: The layer filler.public int getLength()
Gets the overall layer length in bytes.
public int getExtraLength()
Gets the layer extra information length in bytes.
Value: The extra layer length.public LayerMaskData getLayerMaskData()
Gets or sets the layer mask data.
Value: The layer mask data.public void setLayerMaskData(LayerMaskData value)
Gets or sets the layer mask data.
Value: The layer mask data.public LayerBlendingRangesData getLayerBlendingRangesData()
Gets or sets the layer blending ranges data.
Value: The layer blending ranges data.public void setLayerBlendingRangesData(LayerBlendingRangesData value)
Gets or sets the layer blending ranges data.
Value: The layer blending ranges data.public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.getBitsPerPixel
in class Image
public int getHeight()
Gets the image height.
Value: The image height.getHeight
in interface IObjectWithBounds
getHeight
in class Image
public int getWidth()
Gets the image width.
Value: The image width.getWidth
in interface IObjectWithBounds
getWidth
in class Image
public PsdOptions getLayerOptions()
Gets the layer options.
Value: The layer options.public com.aspose.imaging_internal.fileformats.psd.sections.PsdHeader getHeader_internalized()
Gets or sets the header.
Value: The header.public void setHeader_internalized(com.aspose.imaging_internal.fileformats.psd.sections.PsdHeader value)
Gets or sets the header.
Value: The header.public IColorPalette getLayerPalette_internalized()
Gets or sets the layer palette.
Value: The layer palette.public void setLayerPalette_internalized(IColorPalette value)
Gets or sets the layer palette.
Value: The layer palette.public void save(String filePath, ImageOptionsBase options)
Saves the object's data to the specified file location in the specified file format according to save options.
public void save(String filePath, boolean overWrite)
Saves the object's data to the specified file location.
save
in class DataStreamSupporter
filePath
- The file path to save the object's data to.overWrite
- if set to true
over write the file contents, otherwise append will occur.public void save_internalized(com.aspose.ms.System.IO.Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)
save_internalized
in class Image
public void save(String filePath, ImageOptionsBase options, Rectangle boundsRectangle)
Saves the object's data to the specified file location in the specified file format according to save options.
public void drawImage(Point location, RasterImage image)
Draws the image on layer.
location
- The location.image
- The image.PsdImageException
- Location must be non-negativepublic static Layer createInstance_internalized(com.aspose.imaging_internal.fileformats.psd.sections.PsdHeader header, IColorPalette palette)
Creates the new instance of the Layer
class.
header
- The header.palette
- The palette.Layer
class.public void checkAbilityExportToRaster_internalized()
Checks the ability export to raster current layer.
PsdImageException
- Current layer can not be exported to raster format. This could be caused by one of the reasons: it is grouping layer, it is mask layer.public void setName_internalized(String name)
Sets the layer name.
name
- The layer name.public int getBytesPerRowForMask_internalized(int bitDepth)
Gets the bytes per row.
bitDepth
- The bit depth.public int getBytesPerRow_internalized(int bitDepth)
Gets the bytes per row.
bitDepth
- The bit depth.public int getBytesPerRow_internalized()
Gets the bytes per row.
public void initChannelsInfoDataForRawFormat_internalized()
Initializes the channels information data for raw format(used when psd is created from raw layers. For example when exporting from Cad or Djvu)
public void save_internalized(com.aspose.imaging.StreamContainer streamContainer, int psdVersion, int bitDepth)
Saves data to the specified stream container.
streamContainer
- The stream container.psdVersion
- The PSD version.bitDepth
- The bit depth.com.aspose.ms.System.ArgumentNullException
- streamContainer is emptypublic void saveData(com.aspose.ms.System.IO.Stream stream)
Saves the data.
stream
- The stream to save data to.Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.