GifImage Constructor (GifFrameBlock, IColorPalette, Boolean, Byte, Byte, Byte, Boolean) |
Initializes a new instance of the
GifImage class.
Namespace: Aspose.Imaging.FileFormats.GifAssembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 21.04
Syntaxpublic GifImage(
GifFrameBlock firstFrame,
IColorPalette globalPalette,
bool isPaletteSorted,
byte paletteColorResolution,
byte paletteBackgroundColorIndex,
byte aspectRatio,
bool hasTrailer
)
Public Sub New (
firstFrame As GifFrameBlock,
globalPalette As IColorPalette,
isPaletteSorted As Boolean,
paletteColorResolution As Byte,
paletteBackgroundColorIndex As Byte,
aspectRatio As Byte,
hasTrailer As Boolean
)
public:
GifImage(
GifFrameBlock^ firstFrame,
IColorPalette^ globalPalette,
bool isPaletteSorted,
unsigned char paletteColorResolution,
unsigned char paletteBackgroundColorIndex,
unsigned char aspectRatio,
bool hasTrailer
)
new :
firstFrame : GifFrameBlock *
globalPalette : IColorPalette *
isPaletteSorted : bool *
paletteColorResolution : byte *
paletteBackgroundColorIndex : byte *
aspectRatio : byte *
hasTrailer : bool -> GifImage
Parameters
- firstFrame
- Type: Aspose.Imaging.FileFormats.Gif.BlocksGifFrameBlock
The first frame to initialize gif image with. - globalPalette
- Type: Aspose.ImagingIColorPalette
The global palette to use. Note if both firstFrame and globalPalette are null then default global palette is used. - isPaletteSorted
- Type: SystemBoolean
if set to true the palette is sorted. Note the parameter is used when globalPalette is not null. - paletteColorResolution
- Type: SystemByte
The palette color resolution. Note the parameter is used when globalPalette is not null. - paletteBackgroundColorIndex
- Type: SystemByte
The palette background color index. - aspectRatio
- Type: SystemByte
The aspect ratio. - hasTrailer
- Type: SystemBoolean
if set to true the gif image has trailer otherwise no trailer written at the end of the stream.
ExceptionsException | Condition |
---|
ArgumentNullException | The frame cannot be null;firstFrame |
ArgumentException | The first frame already belongs to some other image. Check the Container property.;firstFrame |
GifImageException | The palette specified should contain entries count equal to power of 2. Minimal palette size is 2, maximal is 256. |
See Also