Interface IGifBlockLoaderDescriptor
Interface IGifBlockLoaderDescriptor
Namespace: Aspose.Imaging.FileFormats.Gif
Assembly: Aspose.Imaging.dll (25.7.0)
Gif block Loader descriptor.
public interface IGifBlockLoaderDescriptor
{
string Url { get; set; }
int? Width { get; set; }
int? Height { get; set; }
bool Loop { get; set; }
TimeSpan? Duration { get; set; }
}
Methods
CanLoad(StreamContainer)
Determines whether loader can load the specified data.
bool CanLoad(StreamContainer streamContainer)
{
}
bool CanLoad(StreamContainer streamContainer)
{
}
Parameters
streamContainer
StreamContainer
The stream container to load data from.
Returns
’true’ loader can load the specified data; otherwise, ‘false’.
Load(StreamContainer, IColorPalette)
Loads the gif block.
IGifBlock Load(StreamContainer streamContainer, IColorPalette containerPalette)
{
using (var reader = new BinaryReader(streamContainer.GetStream()))
{
int blockType = reader.ReadByte();
if (blockType != 0x2C && blockType != 0x21)
return null;
}
}
Parameters
streamContainer
StreamContainer
The stream container.
containerPalette
IColorPalette
The container palette.
Returns
A new gif block.