PsdImage

Inheritance: java.lang.Object, com.aspose.psd.DisposableObject, com.aspose.psd.DataStreamSupporter, com.aspose.psd.Image, com.aspose.psd.RasterImage, com.aspose.psd.RasterCachedImage

public final class PsdImage extends RasterCachedImage

Defines the PsdImage class that provides the ability to load, edit, save PSD files as well as update properties, add watermarks, perform graphics operations or convert one file format to another. Aspose.PSD supports import as a layer and export to the following formats: Png, Jpeg, Jpeg2000, Gif, Bmp, Tiff, Psd, Psb along with export to Pdf with selectable text

Constructors

ConstructorDescription
PsdImage(String path)Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in path).
PsdImage(String path, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in path) with constructor parameters.
PsdImage(InputStream stream)Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in stream).
PsdImage(InputStream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in stream) with constructor parameters.
PsdImage(RasterImage rasterImage)Initializes a new instance of the PsdImage class from existing raster image (not psd image) with RGB color mode with 4 channels 8 bit/channel and no compression.
PsdImage(RasterImage rasterImage, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)Initializes a new instance of the PsdImage class from existing raster image (not psd image) with constructor parameters.
PsdImage(int width, int height)Initializes a new instance of the PsdImage class with specified width and height.
PsdImage(int width, int height, IColorPalette colorPalette, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)Initializes a new instance of the PsdImage class with specified width,height, paletter, color mode, channels count and channels bit-length and specified compression mode parameters.

Fields

FieldDescription
DefaultStubEncodingName_internalizedThe default encoding name
DefaultVersionThe default PSD version.
OnCreate_internalizedOccurs when image was loaded
OnLoad_internalizedOccurs when image was loaded by createFirstSupportedLoader
OnSave_internalizedOccurs when image was loaded or saved
OnUseCredit_internalizedOccurs when credit was used
SyncLayersRoot_internalizedThe object that can be used to synchronize access to the layers.
horizontalResolution

Methods

MethodDescription
addBlackWhiteAdjustmentLayer()Adds the black white adjustment layer.
addBrightnessContrastAdjustmentLayer(int brightness, int contrast)Adds the brightness/contrast adjustment layer.
addChannelMixerAdjustmentLayer()Adds the channel mixer adjustment layer with default parameters
addColorBalanceAdjustmentLayer()Adds the color balance adjustment layer.
addCurvesAdjustmentLayer()Adds the Curves Adjustment layer.
addExposureAdjustmentLayer()
addExposureAdjustmentLayer(float exposure)
addExposureAdjustmentLayer(float exposure, float offset)
addExposureAdjustmentLayer(float exposure, float offset, float gammaCorrection)Adds the exposure adjustment layer.
addHueSaturationAdjustmentLayer()Adds the hue/saturation adjustment layer.
addInvertAdjustmentLayer()Adds an invert adjustment layer.
addLayer(Layer layer)Adds the layer.
addLayerGroup(String groupName, int index, boolean startBehaviour)Adds the layer group.
addLayer_internalized(Layer layer, int index)Adds the layer at the index.
addLevelsAdjustmentLayer()Adds the Levels adjustment layer.
addPhotoFilterLayer(Color color)Adds the photofilter layer.
addPosterizeAdjustmentLayer()Adds Posterize Adjustment layer.
addRegularLayer()Adds a new regular layer.
addSelectiveColorAdjustmentLayer()Adds the selective color adjustment layer.
addTextLayer(String text, Rectangle rect)Adds a new Text layer.
addThresholdAdjustmentLayer()Adds the Threshold adjustment layer.
addVibranceAdjustmentLayer()Adds the Vibrance adjustment layer.
adjustBrightness(int brightness)Adjust of a brightness for image.
adjustContrast(float contrast)Image contrasting
adjustGamma(float gamma)Gamma-correction of an image.
adjustGamma(float gammaRed, float gammaGreen, float gammaBlue)Gamma-correction of an image.
beginResize_internalized(int newWidth, int newHeight)Begins the resize process.
binarizeBradley(double brightnessDifference)Binarization of an image using Bradley’s adaptive thresholding algorithm using the integral image thresholding
binarizeBradley(double brightnessDifference, int windowSize)Binarization of an image using Bradley’s adaptive thresholding algorithm using the integral image thresholding
binarizeFixed(byte threshold)Binarization of an image with predefined threshold
binarizeOtsu()Binarization of an image with Otsu thresholding
cacheData()Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer .
canLoad(InputStream stream)Determines whether image can be loaded from the specified stream.
canLoad(InputStream stream, LoadOptions loadOptions)Determines whether image can be loaded from the specified stream and optionally using the specified loadOptions .
canLoad(String filePath)Determines whether image can be loaded from the specified file path.
canLoad(String filePath, LoadOptions loadOptions)Determines whether image can be loaded from the specified file path and optionally using the specified open options.
canLoadInternal_internalized(System.IO.Stream stream)
canLoadInternal_internalized(System.IO.Stream stream, LoadOptions loadOptions)
canSave(ImageOptionsBase options)Determines whether image can be saved to the specified file format represented by the passed save options.
close()Implements the Closable interface and can be used in the try-with-resources statement since JDK 1.7.
convert(PsdOptions newOptions)Converts this image format to the one specified in options.
convertToAps_internalized(ImageOptionsBase options, int mode, Rectangle clippingRectangle)Converts to aps.
create(ImageOptionsBase imageOptions, int width, int height)Creates a new image using the specified create options.
create(Image[] images)Creates a new image using the specified images as pages
create(Image[] images, boolean disposeImages)Creates a new image the specified images as pages.
createInstance_internalized(PsdHeader psdHeader, ColorData colorData, ImageResources imageResources, LayerAndMaskInfo layerAndMaskInfo, ImageData imageData, IColorPalette colorPalette, int version, LoadOptions loadOptions, boolean noLayerLoad)Creates the new instance of the PsdImage class.
createPartialRotateSaver_internalized(PartialRotater resizer, IPixelsSaver pixelsSaver, int width, int height)
create_internalized(System.IO.Stream stream)
create_internalized(System.IO.Stream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)
crop(Rectangle rectangle)Cropping the image.
crop(int leftShift, int rightShift, int topShift, int bottomShift)Crop image with shifts.
dispose()Disposes the current instance.
dither(int ditheringMethod, int bitsCount)Performs dithering on the current image.
dither(int ditheringMethod, int bitsCount, IColorPalette customPalette)Performs dithering on the current image.
doAfterSave_internalized(System.IO.Stream stream)
doCrop_internalized(Rectangle rectangle)Cropping the image.
doResize_internalized(int newWidth, int newHeight, ImageResizeSettings settings)Resizes the image.
doResize_internalized(int newWidth, int newHeight, int resizeType)
doRotate(float angle, boolean resizeProportionally, Color backgroundColor)
doRotateFlip_internalized(int rotateFlipType)Rotates, flips, or rotates and flips the image.
equals(Object arg0)
filter(Rectangle rectangle, FilterOptionsBase options)Filters the specified rectangle.
flattenImage()Flattens all layers.
getActiveLayer()Gets or sets the active layer.
getArgb32Pixel(int x, int y)Gets an image 32-bit ARGB pixel.
getAutoAdjustPalette()Gets a value indicating whether automatic adjust palette.
getBackgroundColor()Gets or sets a value for the background color.
getBitsPerChannel()Gets the bits per channel.
getBitsPerPixel()Gets the image bits per pixel count.
getBounds()Gets the image bounds.
getBufferSizeHint()Gets the buffer size hint which is defined max allowed size for all internal buffers.
getChannelsCount()Gets the PSD channels count.
getClass()
getCmykColorProfile()Gets or sets the CMYK color profile for CMYK PSD images.
getColorMode()Gets or sets the color mode.
getCompression()Gets the compression method.
getContainer()Gets the Image container.
getCurrentOptions_internalized()Gets the current image options.
getDataStreamContainer()Gets the object’s data stream.
getDeeplyAdjustPalette_internalized()Gets the deeply adjust palette.
getDefaultArgb32Pixels(Rectangle rectangle)Gets the default 32-bit ARGB pixels array.
getDefaultOptions(Object[] args)Gets the default options.
getDefaultPixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)Gets the default pixels array using partial pixel loader.
getDefaultRawData(Rectangle rectangle, IPartialRawDataLoader partialRawDataLoader, RawDataSettings rawDataSettings)Gets the default raw data array using partial pixel loader.
getDefaultRawData(Rectangle rectangle, RawDataSettings rawDataSettings)Gets the default raw data array.
getDefaultReplacementFont_internalized()Gets or sets the default replacement font.
getDisposed()Gets a value indicating whether this instance is disposed.
getFileFormat()Gets a value of file format
getFileFormat(System.IO.Stream stream)Gets the file format.
getFileFormat(InputStream stream)Gets the file format.
getFileFormat(String filePath)Gets the file format.
getFittingRectangle(Rectangle rectangle, int width, int height)Gets rectangle which fits the current image.
getFittingRectangle(Rectangle rectangle, int[] pixels, int width, int height)Gets rectangle which fits the current image.
getFormatSpecificPalette_internalized()Gets palette from format-specific places
getGlobalAngle()Gets or sets the global angle.
getGlobalLayerMaskInfo()Gets the global layer mask info.
getGlobalLayerResources()Gets or sets the global layer resources.
getGrayColorProfile()Gets or sets the GRAY (monochrome) color profile for Grayscale PSD images.
getHeight()Gets the image height.
getHorizontalResolution()Gets or sets the horizontal resolution, in pixels per inch, of this PsdImage.
getImageLayers_internalized()Gets or sets the PSD layers.
getImageOpacity()Gets opacity of this image.
getImageResources()Gets or sets the PSD image resources.
getInnerDataTransformer_internalized()Gets the inner data transformer.
getInterruptMonitor()Gets the interrupt monitor.
getLayerAndMask_internalized()Gets the layer and mask.
getLayers()Gets or sets the PSD layers.
getLinkedLayersManager()Gets the linked layers manager.
getMaxAllowedAllocationForPartialRotateSave_internalized()Gets or sets the max allowed allocation for partial rotate save.
getMemoryMgr_internalized()Gets the memory manager.
getModifyDate(boolean useDefault)Gets the date and time the resource image was last modified.
getModifyDate_internalized(boolean useDefault)
getOriginalOptions()Gets the options based on the original file settings.
getPaintableImage_internalized(ImageOptionsBase paintableOptions)Gets the paintable image.
getPalette()Gets the color palette.
getPixel(int x, int y)Gets an image pixel.
getPremultiplyComponents()Gets or sets a value indicating whether the image components must be premultiplied.
getPrivateFontCache_internalized()Creates the private font cache.
getProgressEventHandler()Gets the progress event handler information.
getProgressEventHandlerInfo()Gets the progress event handler information.
getProportionalHeight(int width, int height, int newWidth)Gets a proportional height.
getProportionalWidth(int width, int height, int newHeight)Gets a proportional width.
getPsdHeader_internalized()Gets or sets the PSD header.
getRawCustomColorConverter()Gets or sets the custom color converter
getRawDataFormat()Gets the raw data format.
getRawDataSettings()
getRawFallbackIndex()Gets or sets the fallback index to use when palette index is out of bounds
getRawIndexedColorConverter()Gets or sets the indexed color converter
getRawLineSize()Gets the raw line size in bytes.
getRgbColorProfile()Gets or sets the RGB color profile for CMYK PSD images.
getRotateMode()Gets or sets the rotate mode.
getSize()Gets the image size.
getSkewAngle()Gets the skew angle.
getSmartObjectProvider()Gets the smart object provider.
getSourceImagePath_internalized()Gets the file path of source image if it’s exist.
getSyncExclusiveOperation_internalized()
getSyncRoot_internalized()Gets the synchronize root.
getTimeline()Gets the Timeline (.getTimeline/.setTimeline(Timeline)) of this PsdImage.
getTransparentColor()Gets the image transparent color.
getUpdateXmpData()Gets or sets a value indicating whether to update the XMP metadata.
getUpdatedResourceBlocks_internalized(ResourceBlock[] resources, ResourceBlock resource, boolean removeDuplicates)Gets updated resources with brand new resource block.
getUseMemoryStrategy_internalized()Gets a value indicating whether object uses memory optimization strategy
getUseRawData()Gets or sets a value indicating whether to use raw data loading when the raw data loading is available.
getUsedPalette_internalized()Gets the used palette.
getVentureLicense_internalized()Gets the venture license.
getVersion()Gets or sets the version.
getVerticalResolution()Gets or sets the vertical resolution, in pixels per inch, of this PsdImage.
getWidth()Gets the image width.
getXmpData()Gets or sets the XMP metadata.
grayscale()Transformation of an image to its grayscale representation
hasAlpha()Gets or sets the vertical resolution, in pixels per inch, of this RasterImage .
hasBackgroundColor()Gets a value indicating whether image has background color.
hasImageChanged_internalized()Gets or sets a value indicating whether this instance of image has changed after loading.
hasTransparencyData()Gets or sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.
hasTransparentColor()Gets a value indicating whether image has transparent color.
hashCode()
incrementProgressMaxValue_internalized(int value)Gets or sets the progress max value
indicateProgress_internalized(EventType eventType)Indicates the progress.
insertLayerAfter_internalized(Layer layer, Layer layerToInsert)Inserts the layer after the specified layer with all preparations
isCached()Gets a value indicating whether image data is cached currently.
isFlatten()Gets a value indicating whether psd image is flattened.
isRawDataAvailable()Gets a value indicating whether raw data loading is available.
isUsePalette()Gets a value indicating whether the image palette is used.
isUsePhotoshopCompatibilityMode_internalized()
load(InputStream stream)Loads a new image from the specified stream.
load(InputStream stream, LoadOptions loadOptions)Loads a new image from the specified stream.
load(RandomAccessFile file)Loads a new image from the specified stream.
load(RandomAccessFile file, LoadOptions loadOptions)Loads a new image from the specified stream.
load(String filePath)Loads a new image from the specified file.
load(String filePath, LoadOptions loadOptions)Loads a new image from the specified file.
loadArgb32Pixels(Rectangle rectangle)Loads 32-bit ARGB pixels.
loadArgb64Pixels(Rectangle rectangle)Loads 64-bit ARGB pixels.
loadCmyk32Pixels(Rectangle rectangle)Loads pixels in CMYK format.
loadCmykPixels(Rectangle rectangle)Loads pixels in CMYK format.
loadInternal_internalized(System.IO.Stream stream)
loadInternal_internalized(System.IO.Stream stream, LoadOptions loadOptions)
loadPartialArgb32Pixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)Loads 32-bit ARGB pixels partially by packs.
loadPartialPixels(Rectangle desiredRectangle, IPartialPixelLoader pixelLoader)Loads pixels partially by packs.
loadPixels(Rectangle rectangle)Loads pixels.
loadRawData(Rectangle rectangle, RawDataSettings rawDataSettings, IPartialRawDataLoader rawDataLoader)Loads raw image data using the partial processing mechanism.
loadRawData(Rectangle rectangle, Rectangle destImageBounds, RawDataSettings rawDataSettings, IPartialRawDataLoader rawDataLoader)Loads raw data.
load_internalized(System.IO.Stream stream)
load_internalized(System.IO.Stream stream, long startPosition)Loads a new image from the specified stream.
load_internalized(System.IO.Stream stream, long startPosition, LoadOptions loadOptions)Loads a new image from the specified stream.
mergeLayers(Layer bottomLayer, Layer topLayer)Merges the layers.
normalizeAngle()Normalizes the angle.
normalizeAngle(boolean resizeProportionally, Color backgroundColor)Normalizes the angle.
notify()
notifyAll()
onContainerSet_internalized()Invoke when container of this Image was set.
readArgb32ScanLine(int scanLineIndex)Reads the whole scan line by the specified scan line index.
readScanLine(int scanLineIndex)Reads the whole scan line by the specified scan line index.
removeGlobalTextEngineResource_internalized()Removes the global text engine resource - Method is used for some text-layered psd files, that can not be opened in Adobe Photoshop after processing (almostly for absent fonts text layers related).
replaceColor(Color oldColor, byte oldColorDiff, Color newColor)Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.
replaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.
replaceNonTransparentColors(Color newColor)Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges.
replaceNonTransparentColors(int newColorArgb)Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges.
resize(int newWidth, int newHeight)Resizes the image.
resize(int newWidth, int newHeight, ImageResizeSettings settings)Resizes the image.
resize(int newWidth, int newHeight, int resizeType)Resizes the image.
resizeHeightProportionally(int newHeight)Resizes the height proportionally.
resizeHeightProportionally(int newHeight, ImageResizeSettings settings)Resizes the height proportionally.
resizeHeightProportionally(int newHeight, int resizeType)Resizes the height proportionally.
resizeWidthProportionally(int newWidth)Resizes the width proportionally.
resizeWidthProportionally(int newWidth, ImageResizeSettings settings)Resizes the width proportionally.
resizeWidthProportionally(int newWidth, int resizeType)Resizes the width proportionally.
resizeWithScale_internalized(double scaleX, double scaleY, int resizeType)Resizes the layer with the specified inverse scale.
rotate(float angle)Rotate image around the center.
rotate(float angle, boolean resizeProportionally, Color backgroundColor)Rotate image around the center.
rotateFlip(int rotateFlipType)
save()Saves the image data to the underlying stream.
save(OutputStream stream)Saves the object’s data to the specified stream.
save(OutputStream stream, ImageOptionsBase optionsBase)Saves the image’s data to the specified stream in the specified file format according to save options.
save(OutputStream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)Saves the image’s data to the specified stream in the specified file format according to save options.
save(RandomAccessFile file)Saves the object’s data to the specified stream.
save(RandomAccessFile file, ImageOptionsBase options)Saves the object’s data to the specified file location in the specified file format according to save options.
save(RandomAccessFile file, ImageOptionsBase optionsBase, Rectangle boundsRectangle)Saves the image’s data to the specified stream in the specified file format according to save options.
save(String filePath)Saves the object’s data to the specified file location.
save(String filePath, boolean overWrite)Saves the object’s data to the specified file location.
save(String filePath, ImageOptionsBase options)Saves the object’s data to the specified file location in the specified file format according to save options.
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.
saveArgb32Pixels(Rectangle rectangle, int[] pixels)Saves the 32-bit ARGB pixels.
saveCmyk32Pixels(Rectangle rectangle, int[] pixels)Saves the pixels.
saveCmykPixels(Rectangle rectangle, CmykColor[] pixels)Saves the pixels.
savePixels(Rectangle rectangle, Color[] pixels)Saves the pixels.
saveRawData(byte[] data, int dataOffset, Rectangle rectangle, RawDataSettings rawDataSettings)Saves the raw data.
save_internalized(System.IO.Stream stream)
save_internalized(System.IO.Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)Saves the image’s data to the specified stream in the specified file format according to save options.
setActiveLayer(Layer value)Gets or sets the active layer.
setArgb32Pixel(int x, int y, int argb32Color)Sets an image 32-bit ARGB pixel for the specified position.
setAutoAdjustPalette(boolean value)Sets a value indicating whether automatic adjust palette.
setBackgroundColor(boolean value)Gets or sets a value indicating whether image has background color.
setBackgroundColor(Color value)Gets or sets a value for the background color.
setBufferSizeHint(int value)Sets the buffer size hint which is defined max allowed size for all internal buffers.
setCmykColorProfile(StreamSource value)Gets or sets the CMYK color profile for CMYK PSD images.
setColorMode(short value)Gets or sets the color mode.
setContainer_internalized(Image container)Sets the Image container.
setDataLoaderDirectly_internalized(IRasterImageArgb32PixelLoader loader)Sets the data loader directly.
setDataStreamContainer(StreamContainer value)Sets the object’s data stream.
setFormatSpecificPalette_internalized(IColorPalette newPalette)Sets palette into format-specific places
setGlobalAngle(int value)The global angle.
setGlobalLayerResources(LayerResource[] value)Gets or sets the global layer resources.
setGrayColorProfile(StreamSource value)The GRAY (monochrome) color profile for Grayscale PSD images.
setHorizontalResolution(double value)Gets or sets the horizontal resolution, in pixels per inch, of this PsdImage.
setIgnoreAfterSave_internalized(boolean value)Sets a value indicating whether [ignore after save].
setImageChanged_internalized(boolean value)Gets or sets a value indicating whether this instance of image has changed after loading.
setImageResources(ResourceBlock[] value)Gets or sets the PSD image resources.
setInnerDataTransformer_internalized(IInnerDataTransformer value)Sets the inner data transformer.
setInterruptMonitor(InterruptMonitor value)Sets the interrupt monitor.
setLayers(Layer[] value)Gets or sets the PSD layers.
setMaxAllowedAllocationForPartialRotateSave_internalized(int value)Gets or sets the max allowed allocation for partial rotate save.
setMemoryManager_internalized(MemMgr memoryManager, boolean needDispose)Sets the memory manager.
setPalette(IColorPalette value)Sets the color palette.
setPalette(IColorPalette palette, boolean updateColors)Sets the image palette.
setPixel(int x, int y, Color color)Sets an image pixel for the specified position.
setPremultiplyComponents(boolean value)Gets or sets a value indicating whether the image components must be premultiplied.
setRawCustomColorConverter(IColorConverter value)Gets or sets the custom color converter
setRawFallbackIndex(int value)Gets or sets the fallback index to use when palette index is out of bounds
setRawIndexedColorConverter(IIndexedColorConverter value)Gets or sets the indexed color converter
setResolution(double dpiX, double dpiY)Sets the resolution for this PsdImage.
setRgbColorProfile(StreamSource value)Gets or sets the RGB color profile for CMYK PSD images.
setRotateMode_internalized(int value)Gets or sets the rotate mode.
setTransparencyData(boolean value)Gets or sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.
setTransparentColor(boolean value)Gets a value indicating whether image has transparent color.
setTransparentColor(Color value)Gets the image transparent color.
setUpdateXmpData(boolean value)Gets or sets a value indicating whether to update the XMP metadata.
setUsePhotoshopCompatibilityMode_internalized(boolean usePhotoshopCompatibilityMode_internalized)
setUseRawData(boolean value)Gets or sets a value indicating whether to use raw data loading when the raw data loading is available.
setVentureLicense_internalized(Object ventureLicense)Sets the venture license.
setVersion(int value)Gets or sets the version.
setVerticalResolution(double value)Gets or sets the vertical resolution, in pixels per inch, of this PsdImage.
setXmpData(XmpPacketWrapper value)Gets or sets the XMP metadata.
toBitmap()Converts raster image to the bitmap.
toBitmap_internalized()
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)
writeArgb32ScanLine(int scanLineIndex, int[] argb32Pixels)Writes the whole scan line to the specified scan line index.
writeScanLine(int scanLineIndex, Color[] pixels)Writes the whole scan line to the specified scan line index.

PsdImage(String path)

public PsdImage(String path)

Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in path). Used to initialize psd image with default parameters - Color mode - rgb, 4 channels, 8 bit per channel, Compression - Raw.

Parameters:

ParameterTypeDescription
pathjava.lang.StringThe path to load pixel and palette data from and initialize with.

PsdImage(String path, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

public PsdImage(String path, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in path) with constructor parameters.

Parameters:

ParameterTypeDescription
pathjava.lang.StringThe path to load pixel and palette data from and initialize with.
colorModeshortThe color mode.
channelBitDepthshortThe PSD bit depth per channel.
channelsshortThe PSD channels count.
psdVersionintThe PSD version.
compressionshortThe compression to use.

PsdImage(InputStream stream)

public PsdImage(InputStream stream)

Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in stream). Used to initialize psd image with default parameters - Color mode - rgb, 4 channels, 8 bit per channel, Compression - Raw.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream to load pixel and palette data from and initialize with.

PsdImage(InputStream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

public PsdImage(InputStream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

Initializes a new instance of the PsdImage class from specified path from raster image (not psd image in stream) with constructor parameters.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream to load pixel and palette data from and initialize with.
colorModeshortThe color mode.
channelBitDepthshortThe PSD bit depth per channel.
channelsshortThe PSD channels count.
psdVersionintThe PSD version.
compressionshortThe compression to use.

PsdImage(RasterImage rasterImage)

public PsdImage(RasterImage rasterImage)

Initializes a new instance of the PsdImage class from existing raster image (not psd image) with RGB color mode with 4 channels 8 bit/channel and no compression.

Parameters:

ParameterTypeDescription
rasterImageRasterImageThe image to load pixel and palette data from and initialize with.

PsdImage(RasterImage rasterImage, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

public PsdImage(RasterImage rasterImage, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

Initializes a new instance of the PsdImage class from existing raster image (not psd image) with constructor parameters.

Parameters:

ParameterTypeDescription
rasterImageRasterImageThe image to load pixel and palette data from and initialize with.
colorModeshortThe color mode.
channelBitDepthshortThe PSD bit depth per channel.
channelsshortThe PSD channels count.
psdVersionintThe PSD version.
compressionshortThe compression to use.

PsdImage(int width, int height)

public PsdImage(int width, int height)

Initializes a new instance of the PsdImage class with specified width and height. Used to initialize empty psd image.

Parameters:

ParameterTypeDescription
widthintThe image width.
heightintThe image height.

PsdImage(int width, int height, IColorPalette colorPalette, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

public PsdImage(int width, int height, IColorPalette colorPalette, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

Initializes a new instance of the PsdImage class with specified width,height, paletter, color mode, channels count and channels bit-length and specified compression mode parameters. Used to initialize empty psd image.

Parameters:

ParameterTypeDescription
widthintThe image width.
heightintThe image height.
colorPaletteIColorPaletteThe color palette.
colorModeshortThe color mode.
channelBitDepthshortThe PSD bit depth per channel.
channelsshortThe PSD channels count.
psdVersionintThe PSD version.
compressionshortThe compression to use.

DefaultStubEncodingName_internalized

public static final String DefaultStubEncodingName_internalized

The default encoding name

DefaultVersion

public static final int DefaultVersion

The default PSD version.

OnCreate_internalized

public static final Event<AfterCreate> OnCreate_internalized

Occurs when image was loaded

OnLoad_internalized

public static final Event<AfterLoad> OnLoad_internalized

Occurs when image was loaded by createFirstSupportedLoader

OnSave_internalized

public static final Event<AfterSave> OnSave_internalized

Occurs when image was loaded or saved

OnUseCredit_internalized

public static final Event<AfterUseCredit> OnUseCredit_internalized

Occurs when credit was used

SyncLayersRoot_internalized

public final Object SyncLayersRoot_internalized

The object that can be used to synchronize access to the layers.

horizontalResolution

public double horizontalResolution

addBlackWhiteAdjustmentLayer()

public final BlackWhiteAdjustmentLayer addBlackWhiteAdjustmentLayer()

Adds the black white adjustment layer.

Returns: BlackWhiteAdjustmentLayer - The created black white adjustment layer.

addBrightnessContrastAdjustmentLayer(int brightness, int contrast)

public final BrightnessContrastLayer addBrightnessContrastAdjustmentLayer(int brightness, int contrast)

Adds the brightness/contrast adjustment layer.

Parameters:

ParameterTypeDescription
brightnessintThe brightness.
contrastintThe contrast.

Returns: BrightnessContrastLayer - Created brightness/contrast layer

addChannelMixerAdjustmentLayer()

public final ChannelMixerLayer addChannelMixerAdjustmentLayer()

Adds the channel mixer adjustment layer with default parameters

Returns: ChannelMixerLayer - Added Channel Mixer Layer

addColorBalanceAdjustmentLayer()

public final ColorBalanceAdjustmentLayer addColorBalanceAdjustmentLayer()

Adds the color balance adjustment layer.

Returns: ColorBalanceAdjustmentLayer - A newly created color balance layer.

addCurvesAdjustmentLayer()

public final CurvesLayer addCurvesAdjustmentLayer()

Adds the Curves Adjustment layer.

Returns: CurvesLayer - Created CurvesLayer Layer

addExposureAdjustmentLayer()

public final ExposureLayer addExposureAdjustmentLayer()

Returns: ExposureLayer

addExposureAdjustmentLayer(float exposure)

public final ExposureLayer addExposureAdjustmentLayer(float exposure)

Parameters:

ParameterTypeDescription
exposurefloat

Returns: ExposureLayer

addExposureAdjustmentLayer(float exposure, float offset)

public final ExposureLayer addExposureAdjustmentLayer(float exposure, float offset)

Parameters:

ParameterTypeDescription
exposurefloat
offsetfloat

Returns: ExposureLayer

addExposureAdjustmentLayer(float exposure, float offset, float gammaCorrection)

public final ExposureLayer addExposureAdjustmentLayer(float exposure, float offset, float gammaCorrection)

Adds the exposure adjustment layer.

Parameters:

ParameterTypeDescription
exposurefloatThe exposure.
offsetfloatThe offset.
gammaCorrectionfloatThe gamma correction.

Returns: ExposureLayer - Created Exposure Adjustment Layer

addHueSaturationAdjustmentLayer()

public final HueSaturationLayer addHueSaturationAdjustmentLayer()

Adds the hue/saturation adjustment layer.

Returns: HueSaturationLayer - A newly created hue/saturation layer.

addInvertAdjustmentLayer()

public final InvertAdjustmentLayer addInvertAdjustmentLayer()

Adds an invert adjustment layer.

Returns: InvertAdjustmentLayer - The created invert layer

addLayer(Layer layer)

public final void addLayer(Layer layer)

Adds the layer.

Parameters:

ParameterTypeDescription
layerLayerThe layer.

addLayerGroup(String groupName, int index, boolean startBehaviour)

public final LayerGroup addLayerGroup(String groupName, int index, boolean startBehaviour)

Adds the layer group.

Parameters:

ParameterTypeDescription
groupNamejava.lang.StringName of the group.
indexintThe index of the layer to insert after.
startBehaviourbooleanif set to true [start behaviour] than group will be in open state on start up, otherwise in minimized state.

Returns: LayerGroup - Opening group layer

addLayer_internalized(Layer layer, int index)

public void addLayer_internalized(Layer layer, int index)

Adds the layer at the index.

Parameters:

ParameterTypeDescription
layerLayerThe layer.
indexintThe index.

addLevelsAdjustmentLayer()

public final LevelsLayer addLevelsAdjustmentLayer()

Adds the Levels adjustment layer.

Returns: LevelsLayer - A newly created Levels layer

addPhotoFilterLayer(Color color)

public final PhotoFilterLayer addPhotoFilterLayer(Color color)

Adds the photofilter layer.

Parameters:

ParameterTypeDescription
colorColorThe color.

Returns: PhotoFilterLayer - Created PhotoFilter Layer

addPosterizeAdjustmentLayer()

public final PosterizeLayer addPosterizeAdjustmentLayer()

Adds Posterize Adjustment layer.

Returns: PosterizeLayer - PosterizeLayer instance.

addRegularLayer()

public final Layer addRegularLayer()

Adds a new regular layer.

Returns: Layer - Created regular layer.

addSelectiveColorAdjustmentLayer()

public final SelectiveColorLayer addSelectiveColorAdjustmentLayer()

Adds the selective color adjustment layer.

Returns: SelectiveColorLayer - The created selective color adjustment layer.

addTextLayer(String text, Rectangle rect)

public final TextLayer addTextLayer(String text, Rectangle rect)

Adds a new Text layer.

Parameters:

ParameterTypeDescription
textjava.lang.StringThe layer’s text.
rectRectangleThe layer’s rectangle.

Returns: TextLayer - Created text layer.

addThresholdAdjustmentLayer()

public final ThresholdLayer addThresholdAdjustmentLayer()

Adds the Threshold adjustment layer.

Returns: ThresholdLayer - The created Threshold adjustment layer.

addVibranceAdjustmentLayer()

public final VibranceLayer addVibranceAdjustmentLayer()

Adds the Vibrance adjustment layer.

Returns: VibranceLayer - A newly created Vibrance layer.

adjustBrightness(int brightness)

public void adjustBrightness(int brightness)

Adjust of a brightness for image.

Parameters:

ParameterTypeDescription
brightnessintBrightness value.

adjustContrast(float contrast)

public void adjustContrast(float contrast)

Image contrasting

Parameters:

ParameterTypeDescription
contrastfloatContrast value (in range [-100; 100])

adjustGamma(float gamma)

public void adjustGamma(float gamma)

Gamma-correction of an image.

Parameters:

ParameterTypeDescription
gammafloatGamma for red, green and blue channels coefficient

adjustGamma(float gammaRed, float gammaGreen, float gammaBlue)

public void adjustGamma(float gammaRed, float gammaGreen, float gammaBlue)

Gamma-correction of an image.

Parameters:

ParameterTypeDescription
gammaRedfloatGamma for red channel coefficient
gammaGreenfloatGamma for green channel coefficient
gammaBluefloatGamma for blue channel coefficient

beginResize_internalized(int newWidth, int newHeight)

public IResizeController beginResize_internalized(int newWidth, int newHeight)

Begins the resize process.

Parameters:

ParameterTypeDescription
newWidthintThe new image width.
newHeightintThe new image height.

Returns: com.aspose.internal.IResizeController - The resize controller.

binarizeBradley(double brightnessDifference)

public void binarizeBradley(double brightnessDifference)

Binarization of an image using Bradley’s adaptive thresholding algorithm using the integral image thresholding

Parameters:

ParameterTypeDescription
brightnessDifferencedoubleThe brightness difference between pixel and the average of an s x s window of pixels centered around this pixel.

binarizeBradley(double brightnessDifference, int windowSize)

public void binarizeBradley(double brightnessDifference, int windowSize)

Binarization of an image using Bradley’s adaptive thresholding algorithm using the integral image thresholding

Parameters:

ParameterTypeDescription
brightnessDifferencedoubleThe brightness difference between pixel and the average of an s x s window of pixels centered around this pixel.
windowSizeintThe size of s x s window of pixels centered around this pixel

binarizeFixed(byte threshold)

public void binarizeFixed(byte threshold)

Binarization of an image with predefined threshold

Parameters:

ParameterTypeDescription
thresholdbyteThreshold value. If corresponding gray value of a pixel is greater than threshold, a value of 255 will be assigned to it, 0 otherwise.

binarizeOtsu()

public void binarizeOtsu()

Binarization of an image with Otsu thresholding

cacheData()

public void cacheData()

Caches the data and ensures no additional data loading will be performed from the underlying DataStreamSupporter.DataStreamContainer .

canLoad(InputStream stream)

public static boolean canLoad(InputStream stream)

Determines whether image can be loaded from the specified stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream to load from.

Returns: boolean - true if image can be loaded from the specified stream; otherwise, false .

canLoad(InputStream stream, LoadOptions loadOptions)

public static boolean canLoad(InputStream stream, LoadOptions loadOptions)

Determines whether image can be loaded from the specified stream and optionally using the specified loadOptions .

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream to load from.
loadOptionsLoadOptionsThe load options.

Returns: boolean - true if image can be loaded from the specified stream; otherwise, false .

canLoad(String filePath)

public static boolean canLoad(String filePath)

Determines whether image can be loaded from the specified file path.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path.

Returns: boolean - true if image can be loaded from the specified file; otherwise, false .

canLoad(String filePath, LoadOptions loadOptions)

public static boolean canLoad(String filePath, LoadOptions loadOptions)

Determines whether image can be loaded from the specified file path and optionally using the specified open options.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path.
loadOptionsLoadOptionsThe load options.

Returns: boolean - true if image can be loaded from the specified file; otherwise, false .

canLoadInternal_internalized(System.IO.Stream stream)

public static boolean canLoadInternal_internalized(System.IO.Stream stream)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream

Returns: boolean

canLoadInternal_internalized(System.IO.Stream stream, LoadOptions loadOptions)

public static boolean canLoadInternal_internalized(System.IO.Stream stream, LoadOptions loadOptions)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream
loadOptionsLoadOptions

Returns: boolean

canSave(ImageOptionsBase options)

public boolean canSave(ImageOptionsBase options)

Determines whether image can be saved to the specified file format represented by the passed save options.

Parameters:

ParameterTypeDescription
optionsImageOptionsBaseThe save options to use.

Returns: boolean - true if image can be saved to the specified file format represented by the passed save options; otherwise, false .

close()

public void close()

Implements the Closable interface and can be used in the try-with-resources statement since JDK 1.7. This method simply call dispose method.

convert(PsdOptions newOptions)

public final void convert(PsdOptions newOptions)

Converts this image format to the one specified in options.

Parameters:

ParameterTypeDescription
newOptionsPsdOptionsThe new options.

convertToAps_internalized(ImageOptionsBase options, int mode, Rectangle clippingRectangle)

public ApsPage convertToAps_internalized(ImageOptionsBase options, int mode, Rectangle clippingRectangle)

Converts to aps.

Parameters:

ParameterTypeDescription
optionsImageOptionsBaseThe options.
modeintThe mode.
clippingRectangleRectangleThe clipping rectangle.

Returns: com.aspose.foundation.rendering.ApsPage - The APS page.

create(ImageOptionsBase imageOptions, int width, int height)

public static Image create(ImageOptionsBase imageOptions, int width, int height)

Creates a new image using the specified create options.

Parameters:

ParameterTypeDescription
imageOptionsImageOptionsBaseThe image options.
widthintThe width.
heightintThe height.

Returns: Image - The newly created image.

create(Image[] images)

public static Image create(Image[] images)

Creates a new image using the specified images as pages

Parameters:

ParameterTypeDescription
imagesImage[]The images.

Returns: Image - The Image as IMultipageImage

create(Image[] images, boolean disposeImages)

public static Image create(Image[] images, boolean disposeImages)

Creates a new image the specified images as pages.

Parameters:

ParameterTypeDescription
imagesImage[]The images.
disposeImagesbooleanif set to true [dispose images].

Returns: Image - The Image as IMultipageImage

createInstance_internalized(PsdHeader psdHeader, ColorData colorData, ImageResources imageResources, LayerAndMaskInfo layerAndMaskInfo, ImageData imageData, IColorPalette colorPalette, int version, LoadOptions loadOptions, boolean noLayerLoad)

public static PsdImage createInstance_internalized(PsdHeader psdHeader, ColorData colorData, ImageResources imageResources, LayerAndMaskInfo layerAndMaskInfo, ImageData imageData, IColorPalette colorPalette, int version, LoadOptions loadOptions, boolean noLayerLoad)

Creates the new instance of the PsdImage class.

Parameters:

ParameterTypeDescription
psdHeadercom.aspose.internal.fileformats.psd.sections.PsdHeaderThe PSD header.
colorDatacom.aspose.internal.fileformats.psd.sections.ColorDataThe color data.
imageResourcescom.aspose.internal.fileformats.psd.sections.ImageResourcesThe image resources.
layerAndMaskInfocom.aspose.internal.fileformats.psd.sections.LayerAndMaskInfoThe layer and mask info.
imageDatacom.aspose.internal.fileformats.psd.sections.ImageDataThe image data.
colorPaletteIColorPaletteThe color palette.
versionintThe PSD version.
loadOptionsLoadOptionsThe load options.
noLayerLoadbooleanNo Layer load

Returns: PsdImage - Returns the new instance of the PsdImage class.

createPartialRotateSaver_internalized(PartialRotater resizer, IPixelsSaver pixelsSaver, int width, int height)

public static IPartialProcessor createPartialRotateSaver_internalized(PartialRotater resizer, IPixelsSaver pixelsSaver, int width, int height)

Parameters:

ParameterTypeDescription
resizercom.aspose.internal.rotaters.PartialRotater
pixelsSavercom.aspose.internal.IPixelsSaver
widthint
heightint

Returns: com.aspose.internal.IPartialProcessor

create_internalized(System.IO.Stream stream)

public static PsdImage create_internalized(System.IO.Stream stream)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream

Returns: PsdImage

create_internalized(System.IO.Stream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

public static PsdImage create_internalized(System.IO.Stream stream, short colorMode, short channelBitDepth, short channels, int psdVersion, short compression)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream
colorModeshort
channelBitDepthshort
channelsshort
psdVersionint
compressionshort

Returns: PsdImage

crop(Rectangle rectangle)

public void crop(Rectangle rectangle)

Cropping the image.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle.

crop(int leftShift, int rightShift, int topShift, int bottomShift)

public void crop(int leftShift, int rightShift, int topShift, int bottomShift)

Crop image with shifts.

Parameters:

ParameterTypeDescription
leftShiftintThe left shift.
rightShiftintThe right shift.
topShiftintThe top shift.
bottomShiftintThe bottom shift.

dispose()

public final void dispose()

Disposes the current instance.

dither(int ditheringMethod, int bitsCount)

public void dither(int ditheringMethod, int bitsCount)

Performs dithering on the current image.

Parameters:

ParameterTypeDescription
ditheringMethodintThe dithering method.
bitsCountintThe final bits count for dithering.

dither(int ditheringMethod, int bitsCount, IColorPalette customPalette)

public void dither(int ditheringMethod, int bitsCount, IColorPalette customPalette)

Performs dithering on the current image.

Parameters:

ParameterTypeDescription
ditheringMethodintThe dithering method.
bitsCountintThe final bits count for dithering.
customPaletteIColorPaletteThe custom palette for dithering.

doAfterSave_internalized(System.IO.Stream stream)

public void doAfterSave_internalized(System.IO.Stream stream)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream

doCrop_internalized(Rectangle rectangle)

public void doCrop_internalized(Rectangle rectangle)

Cropping the image.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle.

doResize_internalized(int newWidth, int newHeight, ImageResizeSettings settings)

public void doResize_internalized(int newWidth, int newHeight, ImageResizeSettings settings)

Resizes the image.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
newHeightintThe new height.
settingsImageResizeSettingsThe resize settings.

doResize_internalized(int newWidth, int newHeight, int resizeType)

public void doResize_internalized(int newWidth, int newHeight, int resizeType)

Parameters:

ParameterTypeDescription
newWidthint
newHeightint
resizeTypeint

doRotate(float angle, boolean resizeProportionally, Color backgroundColor)

public void doRotate(float angle, boolean resizeProportionally, Color backgroundColor)

Parameters:

ParameterTypeDescription
anglefloat
resizeProportionallyboolean
backgroundColorColor

doRotateFlip_internalized(int rotateFlipType)

public void doRotateFlip_internalized(int rotateFlipType)

Rotates, flips, or rotates and flips the image.

Parameters:

ParameterTypeDescription
rotateFlipTypeintThe rotate flip type.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

filter(Rectangle rectangle, FilterOptionsBase options)

public void filter(Rectangle rectangle, FilterOptionsBase options)

Filters the specified rectangle.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle.
optionsFilterOptionsBaseThe options.

flattenImage()

public final void flattenImage()

Flattens all layers.

getActiveLayer()

public final Layer getActiveLayer()

Gets or sets the active layer.

Returns: Layer

getArgb32Pixel(int x, int y)

public int getArgb32Pixel(int x, int y)

Gets an image 32-bit ARGB pixel.

Parameters:

ParameterTypeDescription
xintThe pixel x location.
yintThe pixel y location.

Returns: int - The 32-bit ARGB pixel for the specified location.

getAutoAdjustPalette()

public boolean getAutoAdjustPalette()

Gets a value indicating whether automatic adjust palette.

Returns: boolean - true if enable automatic adjust palette; otherwise, false .

getBackgroundColor()

public Color getBackgroundColor()

Gets or sets a value for the background color.

Returns: Color

getBitsPerChannel()

public final int getBitsPerChannel()

Gets the bits per channel.

Value: The bits per channel.

Returns: int

getBitsPerPixel()

public int getBitsPerPixel()

Gets the image bits per pixel count.

Value: The image bits per pixel count.

Returns: int

getBounds()

public Rectangle getBounds()

Gets the image bounds.

Returns: Rectangle - The image bounds.

getBufferSizeHint()

public final int getBufferSizeHint()

Gets 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 buffers

Returns: int - the buffer size hint which is defined max allowed size for all internal buffers.

getChannelsCount()

public final int getChannelsCount()

Gets the PSD channels count.

Value: The PSD channels count.

Returns: int

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCmykColorProfile()

public final StreamSource getCmykColorProfile()

Gets or sets the CMYK color profile for CMYK PSD images. Must be in pair with RgbColorProfile for correct color conversion.

Value: The CMYK color profile.

Returns: StreamSource

getColorMode()

public final short getColorMode()

Gets or sets the color mode.

Value: The color mode.

Returns: short

getCompression()

public final short getCompression()

Gets the compression method.

Value: The compression.

Returns: short

getContainer()

public Image getContainer()

Gets the Image container.

Value: The Image container.

If this property is not null it indicates the image is contained whithin another image.

Returns: Image

getCurrentOptions_internalized()

public final PsdOptions getCurrentOptions_internalized()

Gets the current image options.

Returns: PsdOptions - Current options for PSD image

getDataStreamContainer()

public StreamContainer getDataStreamContainer()

Gets the object’s data stream.

Returns: StreamContainer - The object’s data stream.

getDeeplyAdjustPalette_internalized()

public boolean getDeeplyAdjustPalette_internalized()

Gets the deeply adjust palette.

Returns: boolean - The deeply adjust palette.

getDefaultArgb32Pixels(Rectangle rectangle)

public int[] getDefaultArgb32Pixels(Rectangle rectangle)

Gets the default 32-bit ARGB pixels array.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to get pixels for.

Returns: int[] - The default pixels array.

getDefaultOptions(Object[] args)

public ImageOptionsBase getDefaultOptions(Object[] args)

Gets the default options.

Parameters:

ParameterTypeDescription
argsjava.lang.Object[]The arguments.

Returns: ImageOptionsBase - Default options

getDefaultPixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)

public void getDefaultPixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)

Gets the default pixels array using partial pixel loader.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to get pixels for.
partialPixelLoaderIPartialArgb32PixelLoaderThe partial pixel loader.

getDefaultRawData(Rectangle rectangle, IPartialRawDataLoader partialRawDataLoader, RawDataSettings rawDataSettings)

public void getDefaultRawData(Rectangle rectangle, IPartialRawDataLoader partialRawDataLoader, RawDataSettings rawDataSettings)

Gets the default raw data array using partial pixel loader.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to get pixels for.
partialRawDataLoaderIPartialRawDataLoaderThe partial raw data loader.
rawDataSettingsRawDataSettingsThe raw data settings.

getDefaultRawData(Rectangle rectangle, RawDataSettings rawDataSettings)

public byte[] getDefaultRawData(Rectangle rectangle, RawDataSettings rawDataSettings)

Gets the default raw data array.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to get raw data for.
rawDataSettingsRawDataSettingsThe raw data settings.

Returns: byte[] - The default raw data array.

getDefaultReplacementFont_internalized()

public final String getDefaultReplacementFont_internalized()

Gets or sets the default replacement font. If the Replacement font is set then it will be used for rendering. We need this method for internal support

Returns: java.lang.String - The name of Replacement font

getDisposed()

public final boolean getDisposed()

Gets a value indicating whether this instance is disposed.

Returns: boolean - true if disposed; otherwise, false .

getFileFormat()

public long getFileFormat()

Gets a value of file format

Returns: long

getFileFormat(System.IO.Stream stream)

public static long getFileFormat(System.IO.Stream stream)

Gets the file format.

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.StreamThe stream.

The file format determined does not mean that the specified image may be loaded. Use one of the CanLoad method overloads to determine whether stream may be loaded. |

Returns: long - The determined file format.

getFileFormat(InputStream stream)

public static long getFileFormat(InputStream stream)

Gets the file format.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream.

The file format determined does not mean that the specified image may be loaded. Use one of the CanLoad method overloads to determine whether stream may be loaded. |

Returns: long - The determined file format.

getFileFormat(String filePath)

public static long getFileFormat(String filePath)

Gets the file format.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path.

The file format determined does not mean that the specified image may be loaded. Use one of the CanLoad method overloads to determine whether file may be loaded. |

Returns: long - The determined file format.

getFittingRectangle(Rectangle rectangle, int width, int height)

public static Rectangle getFittingRectangle(Rectangle rectangle, int width, int height)

Gets rectangle which fits the current image.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to get fitting rectangle for.
widthintThe object width.
heightintThe object height.

Returns: Rectangle - The fitting rectangle or exception if no fitting rectangle can be found.

getFittingRectangle(Rectangle rectangle, int[] pixels, int width, int height)

public static Rectangle getFittingRectangle(Rectangle rectangle, int[] pixels, int width, int height)

Gets rectangle which fits the current image.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to get fitting rectangle for.
pixelsint[]The 32-bit ARGB pixels.
widthintThe object width.
heightintThe object height.

Returns: Rectangle - The fitting rectangle or exception if no fitting rectangle can be found.

getFormatSpecificPalette_internalized()

public IColorPalette getFormatSpecificPalette_internalized()

Gets palette from format-specific places

Returns: IColorPalette - Format-specific IColorPalette .

getGlobalAngle()

public final int getGlobalAngle()

Gets or sets the global angle.

Returns: int

getGlobalLayerMaskInfo()

public final GlobalLayerMaskInfo getGlobalLayerMaskInfo()

Gets the global layer mask info.

Returns: GlobalLayerMaskInfo

getGlobalLayerResources()

public final LayerResource[] getGlobalLayerResources()

Gets or sets the global layer resources.

Value: The global layer resources.

Returns: com.aspose.psd.fileformats.psd.layers.LayerResource[]

getGrayColorProfile()

public final StreamSource getGrayColorProfile()

Gets or sets the GRAY (monochrome) color profile for Grayscale PSD images.

Value: The GRAY (monochrome) color profile.

Returns: StreamSource

getHeight()

public int getHeight()

Gets the image height.

Value: The image height.

Returns: int

getHorizontalResolution()

public double getHorizontalResolution()

Gets or sets the horizontal resolution, in pixels per inch, of this PsdImage.

Returns: double

getImageLayers_internalized()

public final Layer[] getImageLayers_internalized()

Gets or sets the PSD layers.

Value: The PSD layers.


Note that if there are no layers the other related information within layer and mask information section will not be preserved (layer masks, resources and etc).

Returns: com.aspose.psd.fileformats.psd.layers.Layer[]

getImageOpacity()

public float getImageOpacity()

Gets opacity of this image.

Returns: float - The opacity value between 0.0 (fully transparent) and 1.0 (fully opaque).

getImageResources()

public final ResourceBlock[] getImageResources()

Gets or sets the PSD image resources.

Value: The PSD image resources.

Returns: com.aspose.psd.fileformats.psd.ResourceBlock[]

getInnerDataTransformer_internalized()

public final IInnerDataTransformer getInnerDataTransformer_internalized()

Gets the inner data transformer.

Value: The inner data transformer.

Returns: com.aspose.internal.IInnerDataTransformer - the inner data transformer.

getInterruptMonitor()

public InterruptMonitor getInterruptMonitor()

Gets the interrupt monitor.

Returns: InterruptMonitor - the interrupt monitor.

getLayerAndMask_internalized()

public final LayerAndMaskInfo getLayerAndMask_internalized()

Gets the layer and mask.

Value: The layer and mask.

Returns: com.aspose.internal.fileformats.psd.sections.LayerAndMaskInfo

getLayers()

public final Layer[] getLayers()

Gets or sets the PSD layers.

Value: The PSD layers.


Note that if there are no layers the other related information within layer and mask information section will not be preserved (layer masks, resources and etc).

Returns: com.aspose.psd.fileformats.psd.layers.Layer[]

getLinkedLayersManager()

public final LinkedLayersManager getLinkedLayersManager()

Gets the linked layers manager.

Returns: LinkedLayersManager

getMaxAllowedAllocationForPartialRotateSave_internalized()

public static int getMaxAllowedAllocationForPartialRotateSave_internalized()

Gets or sets the max allowed allocation for partial rotate save.

Returns: int - The max allowed allocation for partial rotate save.

getMemoryMgr_internalized()

public MemMgr getMemoryMgr_internalized()

Gets the memory manager.

Value: The memory manager.

Returns: com.aspose.internal.memorymanagement.MemMgr - the memory manager.

getModifyDate(boolean useDefault)

public Date getModifyDate(boolean useDefault)

Gets the date and time the resource image was last modified.

Parameters:

ParameterTypeDescription
useDefaultbooleanif set to true uses the information from FileInfo as default value.

Returns: java.util.Date - The date and time the resource image was last modified.

getModifyDate_internalized(boolean useDefault)

public System.DateTime getModifyDate_internalized(boolean useDefault)

Parameters:

ParameterTypeDescription
useDefaultboolean

Returns: com.aspose.ms.System.DateTime

getOriginalOptions()

public ImageOptionsBase getOriginalOptions()

Gets the options based on the original file settings. This can be helpful to keep bit-depth and other parameters of the original image unchanged. For example, if we load a black-white PNG image with 1 bit per pixel and then save it using the DataStreamSupporter.Save(string) method, the output PNG image with 8-bit per pixel will be produced. To avoid it and save PNG image with 1-bit per pixel, use this method to get corresponding saving options and pass them to the Image.Save(string, ImageOptionsBase) method as the second parameter.

Returns: ImageOptionsBase - The options based on the original file settings.

getPaintableImage_internalized(ImageOptionsBase paintableOptions)

public Image getPaintableImage_internalized(ImageOptionsBase paintableOptions)

Gets the paintable image.

Parameters:

ParameterTypeDescription
paintableOptionsImageOptionsBase

Returns: Image - the paintable image.

getPalette()

public IColorPalette getPalette()

Gets the color palette. The color palette is not used when pixels are represented directly.

Returns: IColorPalette - The color palette.

getPixel(int x, int y)

public Color getPixel(int x, int y)

Gets an image pixel.

Parameters:

ParameterTypeDescription
xintThe pixel x location.
yintThe pixel y location.

Returns: Color - The pixel color for the specified location.

getPremultiplyComponents()

public boolean getPremultiplyComponents()

Gets or sets a value indicating whether the image components must be premultiplied.

Returns: boolean - true if the image components must be premultiplied; otherwise, false .

getPrivateFontCache_internalized()

public final PalPrivateFontCache getPrivateFontCache_internalized()

Creates the private font cache.

Returns: com.aspose.foundation.pal.PalPrivateFontCache - The private font cache.

getProgressEventHandler()

public final ProgressEventHandler getProgressEventHandler()

Gets the progress event handler information.

Returns: ProgressEventHandler - the progress event handler information.

getProgressEventHandlerInfo()

public final ProgressEventHandlerInfo getProgressEventHandlerInfo()

Gets the progress event handler information.

Value: The progress event handler information.

Returns: ProgressEventHandlerInfo - the progress event handler information.

getProportionalHeight(int width, int height, int newWidth)

public static int getProportionalHeight(int width, int height, int newWidth)

Gets a proportional height.

Parameters:

ParameterTypeDescription
widthintThe width.
heightintThe height.
newWidthintThe new width.

Returns: int - The proportional height.

getProportionalWidth(int width, int height, int newHeight)

public static int getProportionalWidth(int width, int height, int newHeight)

Gets a proportional width.

Parameters:

ParameterTypeDescription
widthintThe width.
heightintThe height.
newHeightintThe new height.

Returns: int - The proportional width.

getPsdHeader_internalized()

public final PsdHeader getPsdHeader_internalized()

Gets or sets the PSD header.

Value: The PSD header.

Returns: com.aspose.internal.fileformats.psd.sections.PsdHeader

getRawCustomColorConverter()

public IColorConverter getRawCustomColorConverter()

Gets or sets the custom color converter

Returns: IColorConverter - The custom color converter

getRawDataFormat()

public PixelDataFormat getRawDataFormat()

Gets the raw data format.

Value: The raw data format.

Returns: PixelDataFormat

getRawDataSettings()

public RawDataSettings getRawDataSettings()

Gets the current raw data settings. Note when using these settings the data loads without conversion.

Returns: RawDataSettings

getRawFallbackIndex()

public int getRawFallbackIndex()

Gets or sets the fallback index to use when palette index is out of bounds

Returns: int - The fallback index to use when palette index is out of bounds

getRawIndexedColorConverter()

public IIndexedColorConverter getRawIndexedColorConverter()

Gets or sets the indexed color converter

Returns: IIndexedColorConverter - The indexed color converter

getRawLineSize()

public int getRawLineSize()

Gets the raw line size in bytes.

Returns: int - The raw line size in bytes.

getRgbColorProfile()

public final StreamSource getRgbColorProfile()

Gets or sets the RGB color profile for CMYK PSD images. Must be in pair with CmykColorProfile for correct color conversion.

Value: The RGB color profile.

Returns: StreamSource

getRotateMode()

public static int getRotateMode()

Gets or sets the rotate mode.

Returns: int - The rotate mode.

getSize()

public Size getSize()

Gets the image size.

Returns: Size - The image size.

getSkewAngle()

public final float getSkewAngle()

Gets the skew angle. This method is applicable to scanned text documents, to determine the skew angle when scanning.

Returns: float - The skew angle, in degrees.

getSmartObjectProvider()

public final SmartObjectProvider getSmartObjectProvider()

Gets the smart object provider.

Value: The smart object provider.

Returns: SmartObjectProvider

getSourceImagePath_internalized()

public String getSourceImagePath_internalized()

Gets the file path of source image if it’s exist. Returns an empty string if can’t find the source path.

Returns: java.lang.String - The file path of source image.

getSyncExclusiveOperation_internalized()

public Object getSyncExclusiveOperation_internalized()

Returns: java.lang.Object

getSyncRoot_internalized()

public final Object getSyncRoot_internalized()

Gets the synchronize root.

Value: The synchronize root.

Returns: java.lang.Object

getTimeline()

public Timeline getTimeline()

Gets the Timeline (.getTimeline/.setTimeline(Timeline)) of this PsdImage.

Returns: Timeline

getTransparentColor()

public Color getTransparentColor()

Gets the image transparent color.

Returns: Color

getUpdateXmpData()

public boolean getUpdateXmpData()

Gets or sets a value indicating whether to update the XMP metadata.

Returns: boolean - true if update the XMP metadata; otherwise, false .

getUpdatedResourceBlocks_internalized(ResourceBlock[] resources, ResourceBlock resource, boolean removeDuplicates)

public static ResourceBlock[] getUpdatedResourceBlocks_internalized(ResourceBlock[] resources, ResourceBlock resource, boolean removeDuplicates)

Gets updated resources with brand new resource block.

Parameters:

ParameterTypeDescription
resourcesResourceBlock[]The resources.
resourceResourceBlockThe resource to add to existing resources.
removeDuplicatesbooleanif set to true removes resources with identical IDs.

Returns: com.aspose.psd.fileformats.psd.ResourceBlock[] - Returns an array with updated resources blocks.

getUseMemoryStrategy_internalized()

public boolean getUseMemoryStrategy_internalized()

Gets a value indicating whether object uses memory optimization strategy

Value: true if object uses memory optimization strategy; otherwise, false .

Returns: boolean - a value indicating whether object uses memory optimization strategy

getUseRawData()

public boolean getUseRawData()

Gets or sets a value indicating whether to use raw data loading when the raw data loading is available.

Returns: boolean - true if use raw data loading when the raw data loading is available.; otherwise, false .

getUsedPalette_internalized()

public final IColorPalette getUsedPalette_internalized()

Gets the used palette.

Returns: IColorPalette - the used palette.

getVentureLicense_internalized()

public Object getVentureLicense_internalized()

Gets the venture license.

Returns: java.lang.Object - Teh venture license as object.

getVersion()

public final int getVersion()

Gets or sets the version.

Value: The version.

Returns: int

getVerticalResolution()

public double getVerticalResolution()

Gets or sets the vertical resolution, in pixels per inch, of this PsdImage.

Returns: double

getWidth()

public int getWidth()

Gets the image width.

Value: The image width.

Returns: int

getXmpData()

public XmpPacketWrapper getXmpData()

Gets or sets the XMP metadata.

Value: The XMP metadata.

Returns: XmpPacketWrapper

grayscale()

public void grayscale()

Transformation of an image to its grayscale representation

hasAlpha()

public boolean hasAlpha()

Gets or sets the vertical resolution, in pixels per inch, of this RasterImage .

Value: true if this instance has alpha; otherwise, false .

Returns: boolean

hasBackgroundColor()

public boolean hasBackgroundColor()

Gets a value indicating whether image has background color.

Returns: boolean

hasImageChanged_internalized()

public boolean hasImageChanged_internalized()

Gets or sets a value indicating whether this instance of image has changed after loading.

Value: true if this instance has image changed; otherwise, false .

Returns: boolean

hasTransparencyData()

public final boolean hasTransparencyData()

Gets or sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.

Value: true if first alpha channel contains the transparency data for the merged result when specifying layers data; otherwise, false .

Returns: boolean

hasTransparentColor()

public boolean hasTransparentColor()

Gets a value indicating whether image has transparent color.

Returns: boolean

hashCode()

public native int hashCode()

Returns: int

incrementProgressMaxValue_internalized(int value)

public final void incrementProgressMaxValue_internalized(int value)

Gets or sets the progress max value

Value: The progress max value

Parameters:

ParameterTypeDescription
valueint

indicateProgress_internalized(EventType eventType)

public final void indicateProgress_internalized(EventType eventType)

Indicates the progress.

Parameters:

ParameterTypeDescription
eventTypeEventType

insertLayerAfter_internalized(Layer layer, Layer layerToInsert)

public final void insertLayerAfter_internalized(Layer layer, Layer layerToInsert)

Inserts the layer after the specified layer with all preparations

Parameters:

ParameterTypeDescription
layerLayerThe layer.
layerToInsertLayerThe layer to insert.

isCached()

public boolean isCached()

Gets a value indicating whether image data is cached currently.

Returns: boolean - true if image data is cached; otherwise, false .

isFlatten()

public final boolean isFlatten()

Gets a value indicating whether psd image is flattened.

Value: true if this instance is flatten; otherwise, false .

Returns: boolean

isRawDataAvailable()

public boolean isRawDataAvailable()

Gets a value indicating whether raw data loading is available.

Returns: boolean - true if this raw data loading is available; otherwise, false .

isUsePalette()

public boolean isUsePalette()

Gets a value indicating whether the image palette is used.

Value: true if the palette is used in the image; otherwise, false .

Returns: boolean - a value indicating whether the image palette is used.

isUsePhotoshopCompatibilityMode_internalized()

public boolean isUsePhotoshopCompatibilityMode_internalized()

Returns: boolean

load(InputStream stream)

public static Image load(InputStream stream)

Loads a new image from the specified stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream to load image from.

Returns: Image - The loaded image.

load(InputStream stream, LoadOptions loadOptions)

public static Image load(InputStream stream, LoadOptions loadOptions)

Loads a new image from the specified stream.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamThe stream to load image from.
loadOptionsLoadOptionsThe load options.

Returns: Image - The loaded image.

load(RandomAccessFile file)

public static Image load(RandomAccessFile file)

Loads a new image from the specified stream.

Parameters:

ParameterTypeDescription
filejava.io.RandomAccessFileThe file to load image from.

Returns: Image - The loaded image.

load(RandomAccessFile file, LoadOptions loadOptions)

public static Image load(RandomAccessFile file, LoadOptions loadOptions)

Loads a new image from the specified stream.

Parameters:

ParameterTypeDescription
filejava.io.RandomAccessFileThe file to load image from.
loadOptionsLoadOptionsThe load options.

Returns: Image - The loaded image.

load(String filePath)

public static Image load(String filePath)

Loads a new image from the specified file.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path to load image from.

Returns: Image - The loaded image.

load(String filePath, LoadOptions loadOptions)

public static Image load(String filePath, LoadOptions loadOptions)

Loads a new image from the specified file.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path to load image from.
loadOptionsLoadOptionsThe load options.

Returns: Image - The loaded image.

loadArgb32Pixels(Rectangle rectangle)

public int[] loadArgb32Pixels(Rectangle rectangle)

Loads 32-bit ARGB pixels.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to load pixels from.

Returns: int[] - The loaded 32-bit ARGB pixels array.

loadArgb64Pixels(Rectangle rectangle)

public long[] loadArgb64Pixels(Rectangle rectangle)

Loads 64-bit ARGB pixels.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to load pixels from.

Returns: long[] - The loaded 64-bit ARGB pixels array.

loadCmyk32Pixels(Rectangle rectangle)

public int[] loadCmyk32Pixels(Rectangle rectangle)

Loads pixels in CMYK format.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to load pixels from.

Returns: int[] - The loaded CMYK pixels presentes as 32-bit inateger values.

loadCmykPixels(Rectangle rectangle)

public CmykColor[] loadCmykPixels(Rectangle rectangle)

Loads pixels in CMYK format. This method is deprecated. Please use more effective the loadCmyk32Pixels(Rectangle) method.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to load pixels from.

Returns: com.aspose.psd.CmykColor[] - The loaded CMYK pixels array.

loadInternal_internalized(System.IO.Stream stream)

public static Image loadInternal_internalized(System.IO.Stream stream)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream

Returns: Image

loadInternal_internalized(System.IO.Stream stream, LoadOptions loadOptions)

public static Image loadInternal_internalized(System.IO.Stream stream, LoadOptions loadOptions)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream
loadOptionsLoadOptions

Returns: Image

loadPartialArgb32Pixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)

public void loadPartialArgb32Pixels(Rectangle rectangle, IPartialArgb32PixelLoader partialPixelLoader)

Loads 32-bit ARGB pixels partially by packs.

Parameters:

ParameterTypeDescription
rectangleRectangleThe desired rectangle.
partialPixelLoaderIPartialArgb32PixelLoaderThe 32-bit ARGB pixel loader.

loadPartialPixels(Rectangle desiredRectangle, IPartialPixelLoader pixelLoader)

public void loadPartialPixels(Rectangle desiredRectangle, IPartialPixelLoader pixelLoader)

Loads pixels partially by packs.

Parameters:

ParameterTypeDescription
desiredRectangleRectangleThe desired rectangle.
pixelLoaderIPartialPixelLoaderThe pixel loader.

loadPixels(Rectangle rectangle)

public Color[] loadPixels(Rectangle rectangle)

Loads pixels.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to load pixels from.

Returns: com.aspose.psd.Color[] - The loaded pixels array.

loadRawData(Rectangle rectangle, RawDataSettings rawDataSettings, IPartialRawDataLoader rawDataLoader)

public void loadRawData(Rectangle rectangle, RawDataSettings rawDataSettings, IPartialRawDataLoader rawDataLoader)

Loads raw image data using the partial processing mechanism.

Parameters:

ParameterTypeDescription
rectangleRectangleThe desired rectangular area of the image to load data from.
rawDataSettingsRawDataSettingsThe raw data settings.
rawDataLoaderIPartialRawDataLoaderThe raw data loader.

loadRawData(Rectangle rectangle, Rectangle destImageBounds, RawDataSettings rawDataSettings, IPartialRawDataLoader rawDataLoader)

public void loadRawData(Rectangle rectangle, Rectangle destImageBounds, RawDataSettings rawDataSettings, IPartialRawDataLoader rawDataLoader)

Loads raw data.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to load raw data from.
destImageBoundsRectangleThe dest image bounds.
rawDataSettingsRawDataSettingsThe raw data settings to use for loaded data. Note if data is not in the format specified then data conversion will be performed.
rawDataLoaderIPartialRawDataLoaderThe raw data loader.

load_internalized(System.IO.Stream stream)

public static Image load_internalized(System.IO.Stream stream)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream

Returns: Image

load_internalized(System.IO.Stream stream, long startPosition)

public static Image load_internalized(System.IO.Stream stream, long startPosition)

Loads a new image from the specified stream.

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.StreamThe stream to load image from.
startPositionlongThe start position to load image from.

Returns: Image - The loaded image.

load_internalized(System.IO.Stream stream, long startPosition, LoadOptions loadOptions)

public static Image load_internalized(System.IO.Stream stream, long startPosition, LoadOptions loadOptions)

Loads a new image from the specified stream.

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.StreamThe stream to load image from.
startPositionlongThe start position to load image from.
loadOptionsLoadOptionsThe load options.

Returns: Image - The loaded image.

mergeLayers(Layer bottomLayer, Layer topLayer)

public final Layer mergeLayers(Layer bottomLayer, Layer topLayer)

Merges the layers.

Parameters:

ParameterTypeDescription
bottomLayerLayerThe bottom layer.
topLayerLayerThe top layer.

Returns: Layer - Bottom layer after the merge

normalizeAngle()

public final void normalizeAngle()

Normalizes the angle. This method is applicable to scanned text documents to get rid of the skewed scan. This method uses .getSkewAngle and .rotate(float) methods.

normalizeAngle(boolean resizeProportionally, Color backgroundColor)

public void normalizeAngle(boolean resizeProportionally, Color backgroundColor)

Normalizes the angle. This method is applicable to scanned text documents to get rid of the skewed scan. This method uses .getSkewAngle and .rotate(float, boolean, Color) methods.

Parameters:

ParameterTypeDescription
resizeProportionallybooleanif set to true you will have your image size changed according to rotated rectangle (corner points) projections in other case that leaves dimensions untouched and only internal image contents are rotated.
backgroundColorColorColor of the background.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

onContainerSet_internalized()

public void onContainerSet_internalized()

Invoke when container of this Image was set.

readArgb32ScanLine(int scanLineIndex)

public int[] readArgb32ScanLine(int scanLineIndex)

Reads the whole scan line by the specified scan line index.

Parameters:

ParameterTypeDescription
scanLineIndexintZero based index of the scan line.

Returns: int[] - The scan line 32-bit ARGB color values array.

readScanLine(int scanLineIndex)

public Color[] readScanLine(int scanLineIndex)

Reads the whole scan line by the specified scan line index.

Parameters:

ParameterTypeDescription
scanLineIndexintZero based index of the scan line.

Returns: com.aspose.psd.Color[] - The scan line pixel color values array.

removeGlobalTextEngineResource_internalized()

public final void removeGlobalTextEngineResource_internalized()

Removes the global text engine resource - Method is used for some text-layered psd files, that can not be opened in Adobe Photoshop after processing (almostly for absent fonts text layers related). After using this option, user need to Make next in opened in Photoshop file: Menu “Text” -> “Process absent fonts”. After that operation all text will appear again. Please note, that this operation may cause some final layout changes.

replaceColor(Color oldColor, byte oldColorDiff, Color newColor)

public void replaceColor(Color oldColor, byte oldColorDiff, Color newColor)

Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.

Parameters:

ParameterTypeDescription
oldColorColorOld color to be replaced.
oldColorDiffbyteAllowed difference in old color to be able to widen replaced color tone.
newColorColorNew color to replace old color with.

replaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)

public void replaceColor(int oldColorArgb, byte oldColorDiff, int newColorArgb)

Replaces one color to another with allowed difference and preserves original alpha value to save smooth edges.

Parameters:

ParameterTypeDescription
oldColorArgbintOld color ARGB value to be replaced.
oldColorDiffbyteAllowed difference in old color to be able to widen replaced color tone.
newColorArgbintNew color ARGB value to replace old color with.

replaceNonTransparentColors(Color newColor)

public void replaceNonTransparentColors(Color newColor)

Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges. Note: if you use it on images without transparency, all colors will be replaced with a single one.

Parameters:

ParameterTypeDescription
newColorColorNew color to replace non transparent colors with.

replaceNonTransparentColors(int newColorArgb)

public void replaceNonTransparentColors(int newColorArgb)

Replaces all non-transparent colors with new color and preserves original alpha value to save smooth edges. Note: if you use it on images without transparency, all colors will be replaced with a single one.

Parameters:

ParameterTypeDescription
newColorArgbintNew color ARGB value to replace non transparent colors with.

resize(int newWidth, int newHeight)

public void resize(int newWidth, int newHeight)

Resizes the image. The default ResizeType.LeftTopToLeftTop is used.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
newHeightintThe new height.

resize(int newWidth, int newHeight, ImageResizeSettings settings)

public void resize(int newWidth, int newHeight, ImageResizeSettings settings)

Resizes the image.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
newHeightintThe new height.
settingsImageResizeSettingsThe resize settings.

resize(int newWidth, int newHeight, int resizeType)

public void resize(int newWidth, int newHeight, int resizeType)

Resizes the image.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
newHeightintThe new height.
resizeTypeintThe resize type.

resizeHeightProportionally(int newHeight)

public void resizeHeightProportionally(int newHeight)

Resizes the height proportionally.

Parameters:

ParameterTypeDescription
newHeightintThe new height.

resizeHeightProportionally(int newHeight, ImageResizeSettings settings)

public void resizeHeightProportionally(int newHeight, ImageResizeSettings settings)

Resizes the height proportionally.

Parameters:

ParameterTypeDescription
newHeightintThe new height.
settingsImageResizeSettingsThe image resize settings.

resizeHeightProportionally(int newHeight, int resizeType)

public void resizeHeightProportionally(int newHeight, int resizeType)

Resizes the height proportionally.

Parameters:

ParameterTypeDescription
newHeightintThe new height.
resizeTypeintType of the resize.

resizeWidthProportionally(int newWidth)

public void resizeWidthProportionally(int newWidth)

Resizes the width proportionally.

Parameters:

ParameterTypeDescription
newWidthintThe new width.

resizeWidthProportionally(int newWidth, ImageResizeSettings settings)

public void resizeWidthProportionally(int newWidth, ImageResizeSettings settings)

Resizes the width proportionally.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
settingsImageResizeSettingsThe image resize settings.

resizeWidthProportionally(int newWidth, int resizeType)

public void resizeWidthProportionally(int newWidth, int resizeType)

Resizes the width proportionally.

Parameters:

ParameterTypeDescription
newWidthintThe new width.
resizeTypeintType of the resize.

resizeWithScale_internalized(double scaleX, double scaleY, int resizeType)

public final void resizeWithScale_internalized(double scaleX, double scaleY, int resizeType)

Resizes the layer with the specified inverse scale. (new width = old width / scale; new height = old height / scale)

Parameters:

ParameterTypeDescription
scaleXdoubleThe scale X.
scaleYdoubleThe scale Y.
resizeTypeintType of the resize.

rotate(float angle)

public void rotate(float angle)

Rotate image around the center.

Parameters:

ParameterTypeDescription
anglefloatThe rotate angle in degrees. Positive values will rotate clockwise.

rotate(float angle, boolean resizeProportionally, Color backgroundColor)

public void rotate(float angle, boolean resizeProportionally, Color backgroundColor)

Rotate image around the center.

Parameters:

ParameterTypeDescription
anglefloatThe rotate angle in degrees. Positive values will rotate clockwise.
resizeProportionallybooleanif set to true you will have your image size changed according to rotated rectangle (corner points) projections in other case that leaves dimensions untouched and only internal image contents are rotated.
backgroundColorColorColor of the background.

rotateFlip(int rotateFlipType)

public void rotateFlip(int rotateFlipType)

Rotates, flips, or rotates and flips the image.

Parameters:

ParameterTypeDescription
rotateFlipTypeint

save()

public final void save()

Saves the image data to the underlying stream.

save(OutputStream stream)

public void save(OutputStream stream)

Saves the object’s data to the specified stream.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream to save the object’s data to.

save(OutputStream stream, ImageOptionsBase optionsBase)

public void save(OutputStream stream, ImageOptionsBase optionsBase)

Saves the image’s data to the specified stream in the specified file format according to save options.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream to save the image’s data to.
optionsBaseImageOptionsBaseThe save options.

save(OutputStream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)

public void save(OutputStream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)

Saves the image’s data to the specified stream in the specified file format according to save options.

Parameters:

ParameterTypeDescription
streamjava.io.OutputStreamThe stream to save the image’s data to.
optionsBaseImageOptionsBaseThe save options.
boundsRectangleRectangleThe destination image bounds rectangle. Set the empty rectangle for use source bounds.

save(RandomAccessFile file)

public void save(RandomAccessFile file)

Saves the object’s data to the specified stream.

Parameters:

ParameterTypeDescription
filejava.io.RandomAccessFileThe stream to save the object’s data to.

save(RandomAccessFile file, ImageOptionsBase options)

public void save(RandomAccessFile file, ImageOptionsBase options)

Saves the object’s data to the specified file location in the specified file format according to save options.

Parameters:

ParameterTypeDescription
filejava.io.RandomAccessFileThe file to save the image’s data to.
optionsImageOptionsBaseThe options.

save(RandomAccessFile file, ImageOptionsBase optionsBase, Rectangle boundsRectangle)

public void save(RandomAccessFile file, ImageOptionsBase optionsBase, Rectangle boundsRectangle)

Saves the image’s data to the specified stream in the specified file format according to save options.

Parameters:

ParameterTypeDescription
filejava.io.RandomAccessFileThe file to save the image’s data to.
optionsBaseImageOptionsBaseThe save options.
boundsRectangleRectangleThe destination image bounds rectangle. Set the empty rectangle for use sourse bounds.

save(String filePath)

public void save(String filePath)

Saves the object’s data to the specified file location.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path to save the object’s data to.

save(String filePath, boolean overWrite)

public void save(String filePath, boolean overWrite)

Saves the object’s data to the specified file location.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path to save the object’s data to.
overWritebooleanif set to true over write the file contents, otherwise append will occur.

save(String filePath, ImageOptionsBase options)

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.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path.
optionsImageOptionsBaseThe options.

save(String filePath, ImageOptionsBase options, Rectangle boundsRectangle)

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.

Parameters:

ParameterTypeDescription
filePathjava.lang.StringThe file path.
optionsImageOptionsBaseThe options.
boundsRectangleRectangleThe destination image bounds rectangle. Set the empty rectangle for use sourse bounds.

saveArgb32Pixels(Rectangle rectangle, int[] pixels)

public void saveArgb32Pixels(Rectangle rectangle, int[] pixels)

Saves the 32-bit ARGB pixels.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to save pixels to.
pixelsint[]The 32-bit ARGB pixels array.

saveCmyk32Pixels(Rectangle rectangle, int[] pixels)

public void saveCmyk32Pixels(Rectangle rectangle, int[] pixels)

Saves the pixels.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to save pixels to.
pixelsint[]The CMYK pixels presented as the 32-bit integer values.

saveCmykPixels(Rectangle rectangle, CmykColor[] pixels)

public void saveCmykPixels(Rectangle rectangle, CmykColor[] pixels)

Saves the pixels. This method is deprecated. Please use more effective the saveCmyk32Pixels(Rectangle, int[]) method.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to save pixels to.
pixelsCmykColor[]The CMYK pixels array.

savePixels(Rectangle rectangle, Color[] pixels)

public void savePixels(Rectangle rectangle, Color[] pixels)

Saves the pixels.

Parameters:

ParameterTypeDescription
rectangleRectangleThe rectangle to save pixels to.
pixelsColor[]The pixels array.

saveRawData(byte[] data, int dataOffset, Rectangle rectangle, RawDataSettings rawDataSettings)

public void saveRawData(byte[] data, int dataOffset, Rectangle rectangle, RawDataSettings rawDataSettings)

Saves the raw data.

Parameters:

ParameterTypeDescription
databyte[]The raw data.
dataOffsetintThe starting raw data offset.
rectangleRectangleThe raw data rectangle.
rawDataSettingsRawDataSettingsThe raw data settings the data is in.

save_internalized(System.IO.Stream stream)

public void save_internalized(System.IO.Stream stream)

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream

save_internalized(System.IO.Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)

public void save_internalized(System.IO.Stream stream, ImageOptionsBase optionsBase, Rectangle boundsRectangle)

Saves the image’s data to the specified stream in the specified file format according to save options.

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.StreamThe stream to save the image’s data to.
optionsBaseImageOptionsBaseThe save options.
boundsRectangleRectangleThe destination image bounds rectangle. Set the empty rectangle for use source bounds.

setActiveLayer(Layer value)

public final void setActiveLayer(Layer value)

Gets or sets the active layer.

Parameters:

ParameterTypeDescription
valueLayer

setArgb32Pixel(int x, int y, int argb32Color)

public void setArgb32Pixel(int x, int y, int argb32Color)

Sets an image 32-bit ARGB pixel for the specified position.

Parameters:

ParameterTypeDescription
xintThe pixel x location.
yintThe pixel y location.
argb32ColorintThe 32-bit ARGB pixel for the specified position.

setAutoAdjustPalette(boolean value)

public void setAutoAdjustPalette(boolean value)

Sets a value indicating whether automatic adjust palette.

Parameters:

ParameterTypeDescription
valuebooleantrue if enable automatic adjust palette; otherwise, false .

setBackgroundColor(boolean value)

public void setBackgroundColor(boolean value)

Gets or sets a value indicating whether image has background color.

Parameters:

ParameterTypeDescription
valueboolean

setBackgroundColor(Color value)

public void setBackgroundColor(Color value)

Gets or sets a value for the background color.

Parameters:

ParameterTypeDescription
valueColor

setBufferSizeHint(int value)

public final void setBufferSizeHint(int value)

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 buffers

Parameters:

ParameterTypeDescription
valueintthe buffer size hint which is defined max allowed size for all internal buffers.

setCmykColorProfile(StreamSource value)

public final void setCmykColorProfile(StreamSource value)

Gets or sets the CMYK color profile for CMYK PSD images. Must be in pair with RgbColorProfile for correct color conversion.

Value: The CMYK color profile.

Parameters:

ParameterTypeDescription
valueStreamSource

setColorMode(short value)

public final void setColorMode(short value)

Gets or sets the color mode.

Value: The color mode.

Parameters:

ParameterTypeDescription
valueshort

setContainer_internalized(Image container)

public void setContainer_internalized(Image container)

Sets the Image container.

Parameters:

ParameterTypeDescription
containerImageThe Image container.

setDataLoaderDirectly_internalized(IRasterImageArgb32PixelLoader loader)

public void setDataLoaderDirectly_internalized(IRasterImageArgb32PixelLoader loader)

Sets the data loader directly.

Parameters:

ParameterTypeDescription
loaderIRasterImageArgb32PixelLoaderThe data loader.

setDataStreamContainer(StreamContainer value)

public void setDataStreamContainer(StreamContainer value)

Sets the object’s data stream.

Parameters:

ParameterTypeDescription
valueStreamContainerThe object’s data stream.

setFormatSpecificPalette_internalized(IColorPalette newPalette)

public boolean setFormatSpecificPalette_internalized(IColorPalette newPalette)

Sets palette into format-specific places

Parameters:

ParameterTypeDescription
newPaletteIColorPaletteNew 32-bit ARGB palette.

Returns: boolean

setGlobalAngle(int value)

public final void setGlobalAngle(int value)

The global angle.

Parameters:

ParameterTypeDescription
valueint

setGlobalLayerResources(LayerResource[] value)

public final void setGlobalLayerResources(LayerResource[] value)

Gets or sets the global layer resources.

Value: The global layer resources.

Parameters:

ParameterTypeDescription
valueLayerResource[]

setGrayColorProfile(StreamSource value)

public final void setGrayColorProfile(StreamSource value)

The GRAY (monochrome) color profile for Grayscale PSD images.

Value: The GRAY (monochrome) color profile.

Parameters:

ParameterTypeDescription
valueStreamSource

setHorizontalResolution(double value)

public void setHorizontalResolution(double value)

Gets or sets the horizontal resolution, in pixels per inch, of this PsdImage.

Parameters:

ParameterTypeDescription
valuedouble

setIgnoreAfterSave_internalized(boolean value)

public void setIgnoreAfterSave_internalized(boolean value)

Sets a value indicating whether [ignore after save].

Parameters:

ParameterTypeDescription
valuebooleantrue if [ignore after save]; otherwise, false .

setImageChanged_internalized(boolean value)

public void setImageChanged_internalized(boolean value)

Gets or sets a value indicating whether this instance of image has changed after loading.

Parameters:

ParameterTypeDescription
valuebooleantrue if this instance has image changed; otherwise, false .

setImageResources(ResourceBlock[] value)

public final void setImageResources(ResourceBlock[] value)

Gets or sets the PSD image resources.

Value: The PSD image resources.

Parameters:

ParameterTypeDescription
valueResourceBlock[]

setInnerDataTransformer_internalized(IInnerDataTransformer value)

public final void setInnerDataTransformer_internalized(IInnerDataTransformer value)

Sets the inner data transformer.

Value: The inner data transformer.

Parameters:

ParameterTypeDescription
valuecom.aspose.internal.IInnerDataTransformerthe inner data transformer.

setInterruptMonitor(InterruptMonitor value)

public void setInterruptMonitor(InterruptMonitor value)

Sets the interrupt monitor.

Parameters:

ParameterTypeDescription
valueInterruptMonitorthe interrupt monitor.

setLayers(Layer[] value)

public final void setLayers(Layer[] value)

Gets or sets the PSD layers.

Value: The PSD layers.


Note that if there are no layers the other related information within layer and mask information section will not be preserved (layer masks, resources and etc).

Parameters:

ParameterTypeDescription
valueLayer[]

setMaxAllowedAllocationForPartialRotateSave_internalized(int value)

public static void setMaxAllowedAllocationForPartialRotateSave_internalized(int value)

Gets or sets the max allowed allocation for partial rotate save.

Parameters:

ParameterTypeDescription
valueintThe max allowed allocation for partial rotate save.

setMemoryManager_internalized(MemMgr memoryManager, boolean needDispose)

public void setMemoryManager_internalized(MemMgr memoryManager, boolean needDispose)

Sets the memory manager.

Parameters:

ParameterTypeDescription
memoryManagercom.aspose.internal.memorymanagement.MemMgrThe memory manager.
needDisposebooleanif set to true [need dispose].

setPalette(IColorPalette value)

public void setPalette(IColorPalette value)

Sets the color palette. The color palette is not used when pixels are represented directly.

Parameters:

ParameterTypeDescription
valueIColorPaletteThe color palette.

setPalette(IColorPalette palette, boolean updateColors)

public void setPalette(IColorPalette palette, boolean updateColors)

Sets the image palette.

Parameters:

ParameterTypeDescription
paletteIColorPaletteThe palette to set.
updateColorsbooleanif 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.

setPixel(int x, int y, Color color)

public void setPixel(int x, int y, Color color)

Sets an image pixel for the specified position.

Parameters:

ParameterTypeDescription
xintThe pixel x location.
yintThe pixel y location.
colorColorThe pixel color for the specified position.

setPremultiplyComponents(boolean value)

public void setPremultiplyComponents(boolean value)

Gets or sets a value indicating whether the image components must be premultiplied.

Parameters:

ParameterTypeDescription
valuebooleantrue if the image components must be premultiplied; otherwise, false .

setRawCustomColorConverter(IColorConverter value)

public void setRawCustomColorConverter(IColorConverter value)

Gets or sets the custom color converter

Parameters:

ParameterTypeDescription
valueIColorConverterThe custom color converter

setRawFallbackIndex(int value)

public void setRawFallbackIndex(int value)

Gets or sets the fallback index to use when palette index is out of bounds

Parameters:

ParameterTypeDescription
valueintThe fallback index to use when palette index is out of bounds

setRawIndexedColorConverter(IIndexedColorConverter value)

public void setRawIndexedColorConverter(IIndexedColorConverter value)

Gets or sets the indexed color converter

Parameters:

ParameterTypeDescription
valueIIndexedColorConverterThe indexed color converter

setResolution(double dpiX, double dpiY)

public void setResolution(double dpiX, double dpiY)

Sets the resolution for this PsdImage.

Parameters:

ParameterTypeDescription
dpiXdoubleThe horizontal resolution, in dots per inch, of the RasterImage .
dpiYdoubleThe vertical resolution, in dots per inch, of the RasterImage .

setRgbColorProfile(StreamSource value)

public final void setRgbColorProfile(StreamSource value)

Gets or sets the RGB color profile for CMYK PSD images. Must be in pair with CmykColorProfile for correct color conversion.

Value: The RGB color profile.

Parameters:

ParameterTypeDescription
valueStreamSource

setRotateMode_internalized(int value)

public static void setRotateMode_internalized(int value)

Gets or sets the rotate mode.

Parameters:

ParameterTypeDescription
valueintThe rotate mode.

setTransparencyData(boolean value)

public final void setTransparencyData(boolean value)

Gets or sets a value indicating whether first alpha channel contains the transparency data for the merged result when specifying layers data.

Value: true if first alpha channel contains the transparency data for the merged result when specifying layers data; otherwise, false .

Parameters:

ParameterTypeDescription
valueboolean

setTransparentColor(boolean value)

public void setTransparentColor(boolean value)

Gets a value indicating whether image has transparent color.

Parameters:

ParameterTypeDescription
valueboolean

setTransparentColor(Color value)

public void setTransparentColor(Color value)

Gets the image transparent color.

Parameters:

ParameterTypeDescription
valueColor

setUpdateXmpData(boolean value)

public void setUpdateXmpData(boolean value)

Gets or sets a value indicating whether to update the XMP metadata.

Parameters:

ParameterTypeDescription
valuebooleantrue if update the XMP metadata; otherwise, false .

setUsePhotoshopCompatibilityMode_internalized(boolean usePhotoshopCompatibilityMode_internalized)

public void setUsePhotoshopCompatibilityMode_internalized(boolean usePhotoshopCompatibilityMode_internalized)

Parameters:

ParameterTypeDescription
usePhotoshopCompatibilityMode_internalizedboolean

setUseRawData(boolean value)

public void setUseRawData(boolean value)

Gets or sets a value indicating whether to use raw data loading when the raw data loading is available.

Parameters:

ParameterTypeDescription
valuebooleantrue if use raw data loading when the raw data loading is available.; otherwise, false .

setVentureLicense_internalized(Object ventureLicense)

public void setVentureLicense_internalized(Object ventureLicense)

Sets the venture license.

Parameters:

ParameterTypeDescription
ventureLicensejava.lang.ObjectThe venture license.

setVersion(int value)

public final void setVersion(int value)

Gets or sets the version.

Value: The version.

Parameters:

ParameterTypeDescription
valueint

setVerticalResolution(double value)

public void setVerticalResolution(double value)

Gets or sets the vertical resolution, in pixels per inch, of this PsdImage.

Parameters:

ParameterTypeDescription
valuedouble

setXmpData(XmpPacketWrapper value)

public void setXmpData(XmpPacketWrapper value)

Gets or sets the XMP metadata.

Value: The XMP metadata.

Parameters:

ParameterTypeDescription
valueXmpPacketWrapper

toBitmap()

public BufferedImage toBitmap()

Converts raster image to the bitmap.

Returns: java.awt.image.BufferedImage - The bitmap

toBitmap_internalized()

public System.Drawing.Bitmap toBitmap_internalized()

Returns: com.aspose.ms.System.Drawing.Bitmap

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int

writeArgb32ScanLine(int scanLineIndex, int[] argb32Pixels)

public void writeArgb32ScanLine(int scanLineIndex, int[] argb32Pixels)

Writes the whole scan line to the specified scan line index.

Parameters:

ParameterTypeDescription
scanLineIndexintZero based index of the scan line.
argb32Pixelsint[]The 32-bit ARGB colors array to write.

writeScanLine(int scanLineIndex, Color[] pixels)

public void writeScanLine(int scanLineIndex, Color[] pixels)

Writes the whole scan line to the specified scan line index.

Parameters:

ParameterTypeDescription
scanLineIndexintZero based index of the scan line.
pixelsColor[]The pixel colors array to write.