public final class GifFrameBlock extends com.aspose.imaging.RasterCachedImage implements IGifBlock
Gif frame block.
Modifier and Type | Field and Description |
---|---|
static int |
EXTENSION_LABEL
Block extension label.
|
static int |
IMAGE_DESCRIPTOR_SIZE
The image descriptor size.
|
Constructor and Description |
---|
GifFrameBlock(InputStream stream)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(InputStream stream,
int left,
int top)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(InputStream stream,
int left,
int top,
boolean isPaletteSorted,
boolean isGifFrameInterlaced,
byte lzwCodeSize)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(int width,
int height)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(int left,
int top,
int width,
int height)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(int left,
int top,
int width,
int height,
IColorPalette colorPalette,
boolean isPaletteSorted,
boolean isGifFrameInterlaced,
byte bitsPerPixel)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(RasterImage image)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(RasterImage image,
int left,
int top)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(RasterImage image,
int left,
int top,
boolean isPaletteSorted,
boolean isGifFrameInterlaced,
byte lzwCodeSize)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(com.aspose.ms.System.IO.Stream stream) |
GifFrameBlock(String path)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(String path,
int left,
int top)
Initializes a new instance of the
GifFrameBlock class. |
GifFrameBlock(String path,
int left,
int top,
boolean isPaletteSorted,
boolean isGifFrameInterlaced,
byte lzwCodeSize)
Initializes a new instance of the
GifFrameBlock class. |
Modifier and Type | Method and Description |
---|---|
static byte |
createFlags(IColorPalette colorPalette,
boolean isPaletteSorted,
boolean isGifFrameInterlaced)
Creates the flags.
|
static GifFrameBlock |
createInstance_internalized(com.aspose.imaging_internal.fileformats.gif.GifFrameBlockDataReader dataReader,
int left,
int top,
int width,
int height,
IColorPalette colorPalette,
boolean isPaletteSorted,
boolean isGifFrameInterlaced,
byte lzwCodeSize)
Creates the new instance of the
GifFrameBlock class. |
int |
getBitsPerPixel()
Gets the image bits per pixel count.
|
static IColorPalette |
getColorPalette(IColorPalette framePalette,
IColorPalette containerPalette)
Gets the associated color palette.
|
GifGraphicsControlBlock |
getControlBlock()
Gets the graphics control block associated with this block.
|
byte |
getFlags()
Gets or sets the flags.
|
byte |
getGifFrameBitsPerPixel()
Gets or sets the GIF frame bits per pixel.
|
int |
getHeight()
Gets the image height.
|
boolean |
getInterlaced()
Gets or sets a value indicating whether this
GifFrameBlock is interlaced. |
int |
getLeft()
Gets or sets the left image location.
|
int |
getTop()
Gets or sets the top image location.
|
Color |
getTransparentColor()
Gets the transparent color of frame block.
|
int |
getWidth()
Gets the image width.
|
boolean |
hasTransparentColor()
Gets a value indicating whether frame block has transparent color.
|
boolean |
isPaletteSorted()
Gets or sets a value indicating whether color palette is sorted.
|
static void |
saveGif_internalized(RasterImage rasterImage,
com.aspose.imaging.StreamContainer streamContainer,
IColorPalette palette,
byte lzwCodeStartSize,
boolean interlaced,
Rectangle destFrameBounds)
Saves the GIF.
|
static void |
saveGifFrameHeader_internalized(com.aspose.imaging.StreamContainer streamContainer,
Rectangle blockRectangle,
byte flags)
Saves the GIF frame header.
|
void |
setFlags(byte value)
Gets or sets the flags.
|
void |
setGifFrameBitsPerPixel(byte value)
Gets or sets the GIF frame bits per pixel.
|
void |
setInterlaced(boolean value)
Gets or sets a value indicating whether this
GifFrameBlock is interlaced. |
void |
setLeft(int value)
Gets or sets the left image location.
|
void |
setPaletteSorted(boolean value)
Gets or sets a value indicating whether color palette is sorted.
|
void |
setTop(int value)
Gets or sets the top image location.
|
void |
setTransparentColor(boolean value)
Gets a value indicating whether frame block has transparent color.
|
void |
setTransparentColor(Color value)
Gets the transparent color of frame block.
|
adjustBrightness, adjustContrast, adjustGamma, adjustGamma, beginResize_internalized, binarizeBradley, binarizeFixed, binarizeOtsu, cacheData, crop, dither, getFormatSpecificPalette_internalized, grayscale, isCached, resize, resize, rotate, rotateFlip, setFormatSpecificPalette_internalized
crop, dither, filter, getArgb32Pixel, getDefaultArgb32Pixels, getDefaultPixels, getDefaultRawData, getDefaultRawData, getHorizontalResolution, getPixel, getRawCustomColorConverter, getRawDataFormat, getRawDataSettings, getRawFallbackIndex, getRawIndexedColorConverter, getRawLineSize, getVerticalResolution, getXmpData, hasAlpha, isRawDataAvailable, loadArgb32Pixels, loadCmykPixels, loadPartialArgb32Pixels, loadPartialPixels, loadPixels, loadRawData, readScanLine, rotate, saveArgb32Pixels, saveCmykPixels, savePixels, saveRawData, setArgb32Pixel, setHorizontalResolution, setPalette, setPixel, setRawCustomColorConverter, setRawFallbackIndex, setRawIndexedColorConverter, setResolution, setVerticalResolution, setXmpData, writeScanLine
canLoad, canLoad, canLoad, canLoad, canLoadInternal_internalized, canLoadInternal_internalized, canSave, create, getBackgroundColor, getBounds, getContainer, getFileFormat, getFileFormat, getFileFormatInternal_internalized, getFittingRectangle, getFittingRectangle, getPalette, getProportionalHeight, getProportionalWidth, getSize, getVentureLicense_internalized, hasBackgroundColor, load, load, load, load, loadInternal_internalized, loadInternal_internalized, resize, resizeHeightProportionally, resizeHeightProportionally, resizeHeightProportionally, resizeWidthProportionally, resizeWidthProportionally, resizeWidthProportionally, save_internalized, save, save, save, save, save, setBackgroundColor, setBackgroundColor, setContainer_internalized, setPalette, setVentureLicense_internalized
getDataStreamContainer, save_internalized, save, save, save, setDataStreamContainer
close, dispose, getDisposed
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
save_internalized, save
public static final int EXTENSION_LABEL
Block extension label.
public static final int IMAGE_DESCRIPTOR_SIZE
The image descriptor size.
public GifFrameBlock(int width, int height)
Initializes a new instance of the GifFrameBlock
class.
width
- The image width.height
- The image height.public GifFrameBlock(int left, int top, int width, int height)
Initializes a new instance of the GifFrameBlock
class.
left
- The left image position.top
- The top image position.width
- The image width.height
- The image height.public GifFrameBlock(int left, int top, int width, int height, IColorPalette colorPalette, boolean isPaletteSorted, boolean isGifFrameInterlaced, byte bitsPerPixel)
Initializes a new instance of the GifFrameBlock
class.
left
- The left image position.top
- The top image position.width
- The image Width.height
- The image Height.colorPalette
- The color palette.isPaletteSorted
- if set to true
the color palette is sorted.isGifFrameInterlaced
- if set to true
the GIF frame is interlaced.bitsPerPixel
- The bits per pixel.public GifFrameBlock(RasterImage image)
Initializes a new instance of the GifFrameBlock
class.
image
- The image to initialize frame pixel and palette data with.public GifFrameBlock(RasterImage image, int left, int top)
Initializes a new instance of the GifFrameBlock
class.
image
- The image to initialize frame pixel and palette data with.left
- The left image position.top
- The top image position.public GifFrameBlock(RasterImage image, int left, int top, boolean isPaletteSorted, boolean isGifFrameInterlaced, byte lzwCodeSize)
Initializes a new instance of the GifFrameBlock
class.
image
- The image to initialize frame pixel and palette data with.left
- The left image position.top
- The top image position.isPaletteSorted
- if set to true
the color palette is sorted.isGifFrameInterlaced
- if set to true
the GIF frame is interlaced.lzwCodeSize
- The bits per pixel.public GifFrameBlock(InputStream stream)
Initializes a new instance of the GifFrameBlock
class.
stream
- The stream to load an image from and initialize frame pixel and palette data with.public GifFrameBlock(com.aspose.ms.System.IO.Stream stream)
public GifFrameBlock(InputStream stream, int left, int top)
Initializes a new instance of the GifFrameBlock
class.
stream
- The stream to load an image from and initialize frame pixel and palette data with.left
- The left image position.top
- The top image position.public GifFrameBlock(InputStream stream, int left, int top, boolean isPaletteSorted, boolean isGifFrameInterlaced, byte lzwCodeSize)
Initializes a new instance of the GifFrameBlock
class.
stream
- The stream to load an image from and initialize frame pixel and palette data with.left
- The left image position.top
- The top image position.isPaletteSorted
- if set to true
the color palette is sorted.isGifFrameInterlaced
- if set to true
the GIF frame is interlaced.lzwCodeSize
- The bits per pixel.public GifFrameBlock(String path)
Initializes a new instance of the GifFrameBlock
class.
path
- The path to load an image from and initialize frame pixel and palette data with.public GifFrameBlock(String path, int left, int top)
Initializes a new instance of the GifFrameBlock
class.
path
- The path to load an image from and initialize frame pixel and palette data with.left
- The left image position.top
- The top image position.public GifFrameBlock(String path, int left, int top, boolean isPaletteSorted, boolean isGifFrameInterlaced, byte lzwCodeSize)
Initializes a new instance of the GifFrameBlock
class.
path
- The path to load an image from and initialize frame pixel and palette data with.left
- The left image position.top
- The top image position.isPaletteSorted
- if set to true
the color palette is sorted.isGifFrameInterlaced
- if set to true
the GIF frame is interlaced.lzwCodeSize
- The bits per pixel.public int getWidth()
Gets the image width.
Value: The image width.getWidth
in interface IObjectWithBounds
getWidth
in class Image
public int getHeight()
Gets the image height.
Value: The image height.getHeight
in interface IObjectWithBounds
getHeight
in class Image
public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.getBitsPerPixel
in class Image
public boolean getInterlaced()
Gets or sets a value indicating whether this GifFrameBlock
is interlaced.
true
if interlaced; otherwise, false
.public void setInterlaced(boolean value)
Gets or sets a value indicating whether this GifFrameBlock
is interlaced.
true
if interlaced; otherwise, false
.public boolean isPaletteSorted()
Gets or sets a value indicating whether color palette is sorted.
Value:true
if color palette is sorted; otherwise, false
.public void setPaletteSorted(boolean value)
Gets or sets a value indicating whether color palette is sorted.
Value:true
if color palette is sorted; otherwise, false
.public byte getGifFrameBitsPerPixel()
Gets or sets the GIF frame bits per pixel.
Value: The GIF frame bits per pixel.public void setGifFrameBitsPerPixel(byte value)
Gets or sets the GIF frame bits per pixel.
Value: The GIF frame bits per pixel.public int getLeft()
Gets or sets the left image location.
Value: The left image location.public void setLeft(int value)
Gets or sets the left image location.
Value: The left image location.public int getTop()
Gets or sets the top image location.
Value: The top image location.public void setTop(int value)
Gets or sets the top image location.
Value: The top image location.public byte getFlags()
Gets or sets the flags.
Value: The flags.public void setFlags(byte value)
Gets or sets the flags.
Value: The flags.public GifGraphicsControlBlock getControlBlock()
Gets the graphics control block associated with this block.
Value: The control block.public boolean hasTransparentColor()
Gets a value indicating whether frame block has transparent color.
hasTransparentColor
in class RasterImage
public void setTransparentColor(boolean value)
Gets a value indicating whether frame block has transparent color.
setTransparentColor
in class RasterImage
public Color getTransparentColor()
Gets the transparent color of frame block.
getTransparentColor
in class RasterImage
public void setTransparentColor(Color value)
Gets the transparent color of frame block.
setTransparentColor
in class RasterImage
public static IColorPalette getColorPalette(IColorPalette framePalette, IColorPalette containerPalette)
Gets the associated color palette.
framePalette
- The frame palette.containerPalette
- The container palette.public static byte createFlags(IColorPalette colorPalette, boolean isPaletteSorted, boolean isGifFrameInterlaced)
Creates the flags.
colorPalette
- The color palette.isPaletteSorted
- if set to true
the colors in color palette are sorted.isGifFrameInterlaced
- if set to true
the GIF frame image is interlaced.public static GifFrameBlock createInstance_internalized(com.aspose.imaging_internal.fileformats.gif.GifFrameBlockDataReader dataReader, int left, int top, int width, int height, IColorPalette colorPalette, boolean isPaletteSorted, boolean isGifFrameInterlaced, byte lzwCodeSize)
Creates the new instance of the GifFrameBlock
class.
dataReader
- The data reader.left
- The left image position.top
- The top image position.width
- The image width.height
- The image height.colorPalette
- The color palette.isPaletteSorted
- if set to true
the color palette is sorted.isGifFrameInterlaced
- if set to true
the GIF frame is interlaced.lzwCodeSize
- The bits per pixel.GifFrameBlock
class.public static void saveGifFrameHeader_internalized(com.aspose.imaging.StreamContainer streamContainer, Rectangle blockRectangle, byte flags)
Saves the GIF frame header.
streamContainer
- The stream container.blockRectangle
- The block rectangle.flags
- The flags.public static void saveGif_internalized(RasterImage rasterImage, com.aspose.imaging.StreamContainer streamContainer, IColorPalette palette, byte lzwCodeStartSize, boolean interlaced, Rectangle destFrameBounds)
Saves the GIF.
rasterImage
- The raster image.streamContainer
- The stream container.palette
- The palette.lzwCodeStartSize
- Start size of the LZW code.interlaced
- if set to true
the GIF is interlaced.destFrameBounds
- The dest frame bounds.com.aspose.ms.System.ArgumentNullException
- paletteCopyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.