|
|
@ -164,7 +164,6 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
this.globalColorTable?.Dispose(); |
|
|
this.globalColorTable?.Dispose(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
image?.MetaData.AddOrUpdateFormatMetaData(GifFormat.Instance, this.gifMetaData); |
|
|
|
|
|
return image; |
|
|
return image; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -224,7 +223,6 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
this.globalColorTable?.Dispose(); |
|
|
this.globalColorTable?.Dispose(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.metaData.AddOrUpdateFormatMetaData(GifFormat.Instance, this.gifMetaData); |
|
|
|
|
|
return new ImageInfo( |
|
|
return new ImageInfo( |
|
|
new PixelTypeInfo(this.logicalScreenDescriptor.BitsPerPixel), |
|
|
new PixelTypeInfo(this.logicalScreenDescriptor.BitsPerPixel), |
|
|
this.logicalScreenDescriptor.Width, |
|
|
this.logicalScreenDescriptor.Width, |
|
|
@ -542,7 +540,7 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)] |
|
|
private void SetFrameMetaData(ImageFrameMetaData meta) |
|
|
private void SetFrameMetaData(ImageFrameMetaData meta) |
|
|
{ |
|
|
{ |
|
|
var gifMeta = new GifFrameMetaData(); |
|
|
GifFrameMetaData gifMeta = meta.GetFormatMetaData(GifFormat.Instance); |
|
|
if (this.graphicsControlExtension.DelayTime > 0) |
|
|
if (this.graphicsControlExtension.DelayTime > 0) |
|
|
{ |
|
|
{ |
|
|
gifMeta.FrameDelay = this.graphicsControlExtension.DelayTime; |
|
|
gifMeta.FrameDelay = this.graphicsControlExtension.DelayTime; |
|
|
@ -561,7 +559,6 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
gifMeta.DisposalMethod = this.graphicsControlExtension.DisposalMethod; |
|
|
gifMeta.DisposalMethod = this.graphicsControlExtension.DisposalMethod; |
|
|
meta.AddOrUpdateFormatMetaData(GifFormat.Instance, gifMeta); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
@ -605,12 +602,10 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.metaData = meta; |
|
|
this.metaData = meta; |
|
|
this.gifMetaData = new GifMetaData |
|
|
this.gifMetaData = meta.GetFormatMetaData(GifFormat.Instance); |
|
|
{ |
|
|
this.gifMetaData.ColorTableMode = this.logicalScreenDescriptor.GlobalColorTableFlag |
|
|
ColorTableMode = this.logicalScreenDescriptor.GlobalColorTableFlag |
|
|
? GifColorTableMode.Global |
|
|
? GifColorTableMode.Global |
|
|
: GifColorTableMode.Local; |
|
|
: GifColorTableMode.Local |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
if (this.logicalScreenDescriptor.GlobalColorTableFlag) |
|
|
if (this.logicalScreenDescriptor.GlobalColorTableFlag) |
|
|
{ |
|
|
{ |
|
|
|