@@ -26,7 +26,7 @@ private GifFrameMetadata(GifFrameMetadata other)
2626 {
2727 this . ColorTableMode = other . ColorTableMode ;
2828 this . FrameDelay = other . FrameDelay ;
29- this . DisposalMethod = other . DisposalMethod ;
29+ this . DisposalMode = other . DisposalMode ;
3030
3131 if ( other . LocalColorTable ? . Length > 0 )
3232 {
@@ -73,7 +73,7 @@ private GifFrameMetadata(GifFrameMetadata other)
7373 /// Primarily used in Gif animation, this field indicates the way in which the graphic is to
7474 /// be treated after being displayed.
7575 /// </summary>
76- public FrameDisposalMode DisposalMethod { get ; set ; }
76+ public FrameDisposalMode DisposalMode { get ; set ; }
7777
7878 /// <inheritdoc />
7979 public static GifFrameMetadata FromFormatConnectingFrameMetadata ( FormatConnectingFrameMetadata metadata )
@@ -100,7 +100,7 @@ public static GifFrameMetadata FromFormatConnectingFrameMetadata(FormatConnectin
100100 LocalColorTable = metadata . ColorTable ,
101101 ColorTableMode = metadata . ColorTableMode ,
102102 FrameDelay = ( int ) Math . Round ( metadata . Duration . TotalMilliseconds / 10 ) ,
103- DisposalMethod = metadata . DisposalMode ,
103+ DisposalMode = metadata . DisposalMode ,
104104 HasTransparency = hasTransparency ,
105105 TransparencyIndex = hasTransparency ? unchecked ( ( byte ) index ) : byte . MinValue ,
106106 } ;
@@ -109,10 +109,9 @@ public static GifFrameMetadata FromFormatConnectingFrameMetadata(FormatConnectin
109109 /// <inheritdoc />
110110 public FormatConnectingFrameMetadata ToFormatConnectingFrameMetadata ( )
111111 {
112- // throw new NotImplementedException();
113112 // For most scenarios we would consider the blend method to be 'Over' however if a frame has a disposal method of 'RestoreToBackground' or
114113 // has a local palette with 256 colors and is not transparent we should use 'Source'.
115- bool blendSource = this . DisposalMethod == FrameDisposalMode . RestoreToBackground || ( this . LocalColorTable ? . Length == 256 && ! this . HasTransparency ) ;
114+ bool blendSource = this . DisposalMode == FrameDisposalMode . RestoreToBackground || ( this . LocalColorTable ? . Length == 256 && ! this . HasTransparency ) ;
116115
117116 // If the color table is global and frame has no transparency. Consider it 'Source' also.
118117 blendSource |= this . ColorTableMode == FrameColorTableMode . Global && ! this . HasTransparency ;
@@ -122,7 +121,7 @@ public FormatConnectingFrameMetadata ToFormatConnectingFrameMetadata()
122121 ColorTable = this . LocalColorTable ,
123122 ColorTableMode = this . ColorTableMode ,
124123 Duration = TimeSpan . FromMilliseconds ( this . FrameDelay * 10 ) ,
125- DisposalMode = this . DisposalMethod ,
124+ DisposalMode = this . DisposalMode ,
126125 BlendMode = blendSource ? FrameBlendMode . Source : FrameBlendMode . Over ,
127126 } ;
128127 }
@@ -158,7 +157,7 @@ internal static GifFrameMetadata FromAnimatedMetadata(AnimatedImageFrameMetadata
158157 LocalColorTable = metadata . ColorTable ,
159158 ColorTableMode = metadata . ColorTableMode ,
160159 FrameDelay = ( int ) Math . Round ( metadata . Duration . TotalMilliseconds / 10 ) ,
161- DisposalMethod = metadata . DisposalMode ,
160+ DisposalMode = metadata . DisposalMode ,
162161 HasTransparency = hasTransparency ,
163162 TransparencyIndex = hasTransparency ? unchecked ( ( byte ) index ) : byte . MinValue ,
164163 } ;
0 commit comments