public class PngImage
extends com.aspose.imaging.RasterCachedImage
The new png image.
Constructor and Description |
---|
PngImage(InputStream stream)
Initializes a new instance of the
PngImage class. |
PngImage(int width,
int height)
Initializes a new instance of the
PngImage class. |
PngImage(int width,
int height,
int colorType)
Initializes a new instance of the
PngImage class. |
PngImage(com.aspose.imaging_internal.fileformats.png.PngFileSettings fileSettings,
IRasterImageArgb32PixelLoader loader)
Initializes a new instance of the
PngImage class. |
PngImage(PngOptions pngOptions,
int width,
int height)
Initializes a new instance of the
PngImage class. |
PngImage(RasterImage rasterImage)
Initializes a new instance of the
PngImage class. |
PngImage(RasterImage rasterImage,
int colorType)
Initializes a new instance of the
PngImage class. |
PngImage(String path)
Initializes a new instance of the
PngImage class. |
PngImage(String path,
int colorType)
Initializes a new instance of the
PngImage class. |
Modifier and Type | Method and Description |
---|---|
Color |
getBackgroundColor()
Gets the background color.
|
int |
getBitsPerPixel()
Gets the bits per pixel.
|
int |
getHeight()
Gets the height.
|
double |
getHorizontalResolution()
Gets or sets the horizontal resolution.
|
com.aspose.imaging_internal.fileformats.png.PngFileSettings |
getPngFileSettings_internalized()
The png file settings.
|
PixelDataFormat |
getRawDataFormat()
Gets the raw data format.
|
Color |
getTransparentColor()
Gets the transparent color.
|
double |
getVerticalResolution()
Gets or sets the vertical resolution.
|
int |
getWidth()
Gets the width.
|
boolean |
hasBackgroundColor()
Gets a value indicating whether has background color.
|
boolean |
hasTransparentColor()
Gets a value indicating whether image has transparent color.
|
static void |
savePng_internalized(com.aspose.ms.System.IO.Stream stream,
RasterImage image,
PngOptions pngOptions,
Rectangle destImageBounds)
The save png.
|
void |
setBackgroundColor(boolean value)
Gets a value indicating whether has background color.
|
void |
setBackgroundColor(Color value)
Gets the background color.
|
void |
setHorizontalResolution(double value)
Gets or sets the horizontal resolution.
|
void |
setPngFileSettings_internalized(com.aspose.imaging_internal.fileformats.png.PngFileSettings value)
The png file settings.
|
void |
setTransparentColor(boolean value)
Gets a value indicating whether image has transparent color.
|
void |
setTransparentColor(Color value)
Gets the transparent color.
|
void |
setVerticalResolution(double value)
Gets or sets the vertical resolution.
|
adjustBrightness, adjustContrast, adjustGamma, adjustGamma, beginResize_internalized, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, grayscale, isCached, resize, rotate, rotateFlip
crop, dither, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getPixel, getRawCustomColorConverter, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, isRawDataAvailable, loadArgb32Pixels, loadCMYKPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, readScanLine, rotate, saveArgb32Pixels, saveCMYKPixels, savePixels, saveRawData, setArgb32Pixel, setPalette, setPixel, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, writeScanLine
canLoad, canLoad, canLoad, canLoad, canSave, create, getBounds, getContainer, getFileFormat, getFileFormat, getFittingRectangle, getFittingRectangle, getPalette, getProportionalHeight, getProportionalWidth, getSize, load, load, load, load, loadInternal_internalized, resize, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, save_internalized, save_internalized, save, save, save, save, save, setContainer_internalized, setPalette
getDataStreamContainer, save_internalized, save, save, save, setDataStreamContainer
dispose, getDisposed
public PngImage(int width, int height)
Initializes a new instance of the PngImage
class.
width
- The width.height
- The height.public PngImage(String path)
Initializes a new instance of the PngImage
class.
path
- The path to load an image.public PngImage(RasterImage rasterImage)
Initializes a new instance of the PngImage
class.
rasterImage
- The raster image.public PngImage(String path, int colorType)
Initializes a new instance of the PngImage
class.
path
- The path to load an image.colorType
- The color type.com.aspose.ms.System.ArgumentNullException
public PngImage(RasterImage rasterImage, int colorType)
Initializes a new instance of the PngImage
class.
rasterImage
- The raster image.colorType
- The color type.public PngImage(InputStream stream)
Initializes a new instance of the PngImage
class.
stream
- The stream to load an image.public PngImage(int width, int height, int colorType)
Initializes a new instance of the PngImage
class.
width
- The width.height
- The height.colorType
- The color type.public PngImage(PngOptions pngOptions, int width, int height)
Initializes a new instance of the PngImage
class.
pngOptions
- The png options.width
- The width.height
- The height.public PngImage(com.aspose.imaging_internal.fileformats.png.PngFileSettings fileSettings, IRasterImageArgb32PixelLoader loader)
Initializes a new instance of the PngImage
class.
fileSettings
- loader
- The loader.public int getBitsPerPixel()
Gets the bits per pixel.
getBitsPerPixel
in class Image
public int getHeight()
Gets the height.
getHeight
in interface IObjectWithBounds
getHeight
in class Image
public double getHorizontalResolution()
Gets or sets the horizontal resolution.
getHorizontalResolution
in class RasterImage
public void setHorizontalResolution(double value)
Gets or sets the horizontal resolution.
setHorizontalResolution
in class RasterImage
public PixelDataFormat getRawDataFormat()
Gets the raw data format.
getRawDataFormat
in class RasterImage
public double getVerticalResolution()
Gets or sets the vertical resolution.
getVerticalResolution
in class RasterImage
public void setVerticalResolution(double value)
Gets or sets the vertical resolution.
setVerticalResolution
in class RasterImage
public int getWidth()
Gets the width.
getWidth
in interface IObjectWithBounds
getWidth
in class Image
public boolean hasTransparentColor()
Gets a value indicating whether image has transparent color.
hasTransparentColor
in class RasterImage
public void setTransparentColor(boolean value)
Gets a value indicating whether image has transparent color.
setTransparentColor
in class RasterImage
public Color getTransparentColor()
Gets the transparent color.
getTransparentColor
in class RasterImage
public void setTransparentColor(Color value)
Gets the transparent color.
setTransparentColor
in class RasterImage
public boolean hasBackgroundColor()
Gets a value indicating whether has background color.
hasBackgroundColor
in class Image
public void setBackgroundColor(boolean value)
Gets a value indicating whether has background color.
setBackgroundColor
in class Image
public Color getBackgroundColor()
Gets the background color.
getBackgroundColor
in class Image
public void setBackgroundColor(Color value)
Gets the background color.
setBackgroundColor
in class Image
public com.aspose.imaging_internal.fileformats.png.PngFileSettings getPngFileSettings_internalized()
The png file settings.
public void setPngFileSettings_internalized(com.aspose.imaging_internal.fileformats.png.PngFileSettings value)
The png file settings.
public static void savePng_internalized(com.aspose.ms.System.IO.Stream stream, RasterImage image, PngOptions pngOptions, Rectangle destImageBounds)
The save png.
stream
- The stream.image
- The image.pngOptions
- The file settings.destImageBounds
- The dest image bounds.FrameworkException
- new PngImageException(You need to specify color palette.)PngImageException
- You need to specify color palette.com.aspose.ms.System.ArgumentOutOfRangeException
com.aspose.ms.System.ArgumentOutOfRangeException
Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.