|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.imaging.DisposableObject
com.aspose.imaging.DataStreamSupporter
com.aspose.imaging.Image
com.aspose.imaging.RasterImage
com.aspose.imaging.fileformats.gif.blocks.GifFrameBlock
public class GifFrameBlock
Gif frame block.
Field Summary | |
---|---|
static int |
ExtensionLabel
Block extension label. |
static int |
ImageDescriptorSize
The image descriptor size. |
Constructor Summary | |
---|---|
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(Stream dataStream,
int left,
int top,
int width,
int height,
IColorPalette colorPalette,
boolean isPaletteSorted,
boolean isGifFrameInterlaced,
byte bitsPerPixel)
Initializes a new instance of the GifFrameBlock class. |
Method Summary | |
---|---|
static byte |
createFlags(IColorPalette colorPalette,
boolean isPaletteSorted,
boolean isGifFrameInterlaced)
Creates the flags. |
void |
flush()
Flushes all the cached data directly to the object's stream. |
int |
getBitsPerPixel()
Gets the image bits per pixel count. |
byte |
getFlags()
Gets the flags. |
byte |
getGifFrameBitsPerPixel()
Gets the GIF frame bits per pixel. |
int |
getHeight()
Gets the image height. |
java.lang.String |
getImageLoaderDescriptorName()
Gets the name of the image loader descriptor. |
boolean |
getInterlaced()
Gets a value indicating whether this GifFrameBlock is interlaced. |
int |
getLeft()
Gets the left image location. |
int |
getTop()
Gets the top image location. |
int |
getWidth()
Gets the image width. |
boolean |
isChanged()
Gets a value indicating whether block has changed and requires save. |
void |
isChanged(boolean value)
Sets a value indicating whether block has changed and requires save. |
boolean |
isPaletteSorted()
Gets a value indicating whether color palette is sorted. |
void |
isPaletteSorted(boolean value)
Sets a value indicating whether color palette is sorted. |
protected Color[] |
loadPixelsInternal(Rectangle rectangle)
Loads pixels (format specific method). |
protected void |
onPaletteChanged(IColorPalette oldPalette,
IColorPalette newPalette)
Called when palette is changed. |
protected void |
releaseManagedResources()
Releases the managed resources. |
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the GifFrameBlock to a new dimensions. |
void |
save(java.io.InputStream stream)
Saves the object's data to the InputStream. |
void |
save(java.lang.String filePath)
Saves the object's data to the specified file location. |
protected void |
savePixelsInternal(Rectangle rectangle,
Color[] pixels)
Saves pixels (format specific method). |
void |
setFlags(byte value)
Sets the flags. |
void |
setGifFrameBitsPerPixel(byte value)
Sets the GIF frame bits per pixel. |
void |
setInterlaced(boolean value)
Sets a value indicating whether this GifFrameBlock is interlaced. |
void |
setLeft(int value)
Sets the left image location. |
void |
setTop(int value)
Sets the top image location. |
Methods inherited from class com.aspose.imaging.RasterImage |
---|
getHorizontalResolution, getPixel, getVerticalResolution, loadPixels, readScanLine, rotateFlip, rotateFlip, savePixels, setHorizontalResolution, setPalette, setPixel, setResolution, setVerticalResolution, writeScanLine |
Methods inherited from class com.aspose.imaging.Image |
---|
canLoad, canLoad, canLoad, canLoad, canSave, create, getBounds, getContainer, getFileFormat, getFileFormat, getFitRectangle, getFitRectangle, getFittingRectangle, getFittingRectangle, getPalette, getSize, getUseCompactPalette, load, load, onCompactPaletteUsageChanged, onPaletteChanging, resize, save, save, save, setContainer, setPalette, setUseCompactPalette |
Methods inherited from class com.aspose.imaging.DataStreamSupporter |
---|
getDataStreamContainer, onDataStreamContainerChanging, setDataStreamContainer |
Methods inherited from class com.aspose.imaging.DisposableObject |
---|
dispose, getDisposed, releaseUnmanagedResources, verifyNotDisposed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ExtensionLabel
Block extension label.
public static final int ImageDescriptorSize
The image descriptor size.
Constructor Detail |
---|
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(Stream dataStream, int left, int top, int width, int height, IColorPalette colorPalette, boolean isPaletteSorted, boolean isGifFrameInterlaced, byte bitsPerPixel)
Initializes a new instance of the GifFrameBlock
class.
dataStream
- The data stream. The pixel data will be loaded from this stream.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.Method Detail |
---|
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 frmae image is interlaced.
public void flush()
Flushes all the cached data directly to the object's stream.
flush
in class DataStreamSupporter
public int getBitsPerPixel()
Gets the image bits per pixel count.
Value: The image bits per pixel count.
getBitsPerPixel
in class Image
public byte getFlags()
Gets the flags.
Value: The flags.
public byte getGifFrameBitsPerPixel()
Gets the GIF frame bits per pixel.
Value: The GIF frame bits per pixel.
public int getHeight()
Gets the image height.
Value: The image height.
getHeight
in interface IObjectWithBounds
getHeight
in class Image
public java.lang.String getImageLoaderDescriptorName()
Gets the name of the image loader descriptor.
Value: The name of the image loader descriptor.
getImageLoaderDescriptorName
in class Image
public boolean getInterlaced()
Gets a value indicating whether this GifFrameBlock
is interlaced.
true
if interlaced; otherwise, false
.
public int getLeft()
Gets the left image location.
Value: The left image location.
public int getTop()
Gets the top image location.
Value: The top image location.
public int getWidth()
Gets the image width.
Value: The image width.
getWidth
in interface IObjectWithBounds
getWidth
in class Image
public boolean isChanged()
Gets a value indicating whether block has changed and requires save.
Value:true
if block has changed; otherwise, false
.
isChanged
in interface IGifBlock
public void isChanged(boolean value)
Sets a value indicating whether block has changed and requires save.
Value:true
if block has changed; otherwise, false
.
isChanged
in interface IGifBlock
public boolean isPaletteSorted()
Gets a value indicating whether color palette is sorted.
Value:true
if color palette is sorted; otherwise, false
.
public void isPaletteSorted(boolean value)
Sets a value indicating whether color palette is sorted.
Value:true
if color palette is sorted; otherwise, false
.
protected Color[] loadPixelsInternal(Rectangle rectangle)
Loads pixels (format specific method).
loadPixelsInternal
in class RasterImage
rectangle
- The rectangle to load pixels from.
protected void onPaletteChanged(IColorPalette oldPalette, IColorPalette newPalette)
Called when palette is changed.
onPaletteChanged
in class Image
oldPalette
- The old palette.newPalette
- The new palette.protected void releaseManagedResources()
Releases the managed resources. Make sure no unmanaged resources are released here, since they may have been already released.
releaseManagedResources
in class RasterImage
public void resize(int newWidth, int newHeight, int resizeType)
Resizes the GifFrameBlock
to a new dimensions.
resize
in class RasterImage
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.public void save(java.io.InputStream stream)
Saves the object's data to the InputStream.
save
in interface IGifBlock
save
in class DataStreamSupporter
stream
- The stream to save the object's data to.public void save(java.lang.String filePath)
Saves the object's data to the specified file location.
save
in class DataStreamSupporter
filePath
- The file path to save the object's data to.protected void savePixelsInternal(Rectangle rectangle, Color[] pixels)
Saves pixels (format specific method).
savePixelsInternal
in class RasterImage
rectangle
- The rectangle to save pixels to.pixels
- The pixels array.public void setFlags(byte value)
Sets the flags.
Value: The flags.
public void setGifFrameBitsPerPixel(byte value)
Sets the GIF frame bits per pixel.
Value: The GIF frame bits per pixel.
public void setInterlaced(boolean value)
Sets a value indicating whether this GifFrameBlock
is interlaced.
true
if interlaced; otherwise, false
.
public void setLeft(int value)
Sets the left image location.
Value: The left image location.
public void setTop(int value)
Sets the top image location.
Value: The top image location.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |