|
|||||||||
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.GifImage
public class GifImage
A gif image.
Constructor Summary | |
---|---|
GifImage(GifHeader gifHeader,
IGifBlock[] blocks,
IColorPalette colorPalette,
boolean useCompactPalette,
boolean hasTrailer,
GifFrameBlock activeFrame,
boolean changesOccured)
Initializes a new instance of the GifImage class. |
Method Summary | |
---|---|
void |
addBlock(IGifBlock block)
Adds a new GIF block. |
void |
clearBlocks()
Clears all the GIF blocks. |
void |
flush()
Flushes all the cached data directly to the object's stream. |
GifFrameBlock |
getActiveFrame()
Gets the active frame. |
Color |
getBackgroundColor()
Gets the background color. |
byte |
getBackgroundColorIndex()
Gets the background color index. |
int |
getBitsPerPixel()
Gets the bits per pixel count. |
IGifBlock[] |
getBlocks()
Gets the GIF blocks. |
int |
getHeight()
Gets the object height. |
java.lang.String |
getImageLoaderDescriptorName()
Gets the name of the image loader descriptor. |
int |
getWidth()
Gets the object width. |
boolean |
hasTrailer()
Gets a value indicating whether GIF has trailer. |
void |
hasTrailer(boolean value)
Sets a value indicating whether GIF has trailer. |
protected void |
onPaletteChanged(IColorPalette oldPalette,
IColorPalette newPalette)
Called when palette is changed. |
protected void |
onPaletteChanging(IColorPalette oldPalette,
IColorPalette newPalette)
Called when palette is changing. |
void |
orderBlocks()
Orders the GIF blocks according to the GIF specification. |
protected void |
releaseManagedResources()
Releases the managed resources. |
void |
removeBlock(IGifBlock block)
Removes the GIF block. |
void |
resize(int newWidth,
int newHeight,
int resizeType)
Resizes the image. |
void |
setActiveFrame(GifFrameBlock value)
Sets the active frame. |
void |
setBackgroundColor(Color value)
Sets the background color. |
void |
setBackgroundColorIndex(byte value)
Sets the background color index. |
Methods inherited from class com.aspose.imaging.RasterImage |
---|
getHorizontalResolution, getPixel, getVerticalResolution, loadPixels, loadPixelsInternal, readScanLine, rotateFlip, rotateFlip, savePixels, savePixelsInternal, 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, resize, save, save, save, setContainer, setPalette, setUseCompactPalette |
Methods inherited from class com.aspose.imaging.DataStreamSupporter |
---|
getDataStreamContainer, onDataStreamContainerChanging, save, save, 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 |
Constructor Detail |
---|
public GifImage(GifHeader gifHeader, IGifBlock[] blocks, IColorPalette colorPalette, boolean useCompactPalette, boolean hasTrailer, GifFrameBlock activeFrame, boolean changesOccured)
Initializes a new instance of the GifImage
class.
gifHeader
- The GIF header.blocks
- The GIF blocks.colorPalette
- The color palette.useCompactPalette
- if set to true
compact palette is used.hasTrailer
- if set to true
GIF has trailer.activeFrame
- The active frame.changesOccured
- if set to true
changes were occured and save is required.Method Detail |
---|
public void addBlock(IGifBlock block)
Adds a new GIF block.
block
- The GIF block to add.public void clearBlocks()
Clears all the GIF blocks.
public void flush()
Flushes all the cached data directly to the object's stream.
flush
in class DataStreamSupporter
public GifFrameBlock getActiveFrame()
Gets the active frame.
Value: The active frame.
public Color getBackgroundColor()
Gets the background color.
Value: The background color.
public byte getBackgroundColorIndex()
Gets the background color index.
Value: The background color index.
public int getBitsPerPixel()
Gets the bits per pixel count.
Value: The bits per pixel count.
getBitsPerPixel
in class Image
public IGifBlock[] getBlocks()
Gets the GIF blocks.
public int getHeight()
Gets the object height.
Value: The object 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 int getWidth()
Gets the object width.
Value: The object width.
getWidth
in interface IObjectWithBounds
getWidth
in class Image
public boolean hasTrailer()
Gets a value indicating whether GIF has trailer.
Value:true
if GIF has trailer; otherwise, false
.
public void hasTrailer(boolean value)
Sets a value indicating whether GIF has trailer.
Value:true
if GIF has trailer; otherwise, false
.
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 onPaletteChanging(IColorPalette oldPalette, IColorPalette newPalette)
Called when palette is changing.
onPaletteChanging
in class Image
oldPalette
- The old palette.newPalette
- The new palette.public void orderBlocks()
Orders the GIF blocks according to the GIF specification. Some GifGraphicsControlBlock
may be removed for proper GIF layout.
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 removeBlock(IGifBlock block)
Removes the GIF block.
block
- The block to remove.
public void resize(int newWidth, int newHeight, int resizeType)
Resizes the image.
resize
in class RasterImage
newWidth
- The new width.newHeight
- The new height.resizeType
- The resize type.public void setActiveFrame(GifFrameBlock value)
Sets the active frame.
Value: The active frame.
public void setBackgroundColor(Color value)
Sets the background color.
Value: The background color.
public void setBackgroundColorIndex(byte value)
Sets the background color index.
Value: The background color index.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |