@@ -125,12 +125,6 @@ public bool UseMonochrome
125125 /// </summary>
126126 public uint ? Width { get ; set ; }
127127
128- internal void ForceSingleFrame ( )
129- {
130- FrameCount = 1 ;
131- ApplyFrame ( ) ;
132- }
133-
134128 private static string GetDefineKey ( IDefine define )
135129 {
136130 if ( define . Format == MagickFormat . Unknown )
@@ -139,19 +133,6 @@ private static string GetDefineKey(IDefine define)
139133 return EnumHelper . GetName ( define . Format ) + ":" + define . Name ;
140134 }
141135
142- private string ? GetScenes ( )
143- {
144- if ( ! FrameIndex . HasValue && ( ! FrameCount . HasValue || FrameCount . Value == 1 ) )
145- return null ;
146-
147- if ( FrameIndex . HasValue && ( ! FrameCount . HasValue || FrameCount . Value == 1 ) )
148- return FrameIndex . Value . ToString ( CultureInfo . InvariantCulture ) ;
149-
150- var frame = FrameIndex ?? 0 ;
151- var count = FrameCount ?? 1 ;
152- return string . Format ( CultureInfo . InvariantCulture , "{0}-{1}" , frame , frame + count ) ;
153- }
154-
155136 private void ApplyDefines ( )
156137 {
157138 if ( Defines is null )
@@ -178,9 +159,13 @@ private void ApplyFrame()
178159 if ( ! FrameIndex . HasValue && ! FrameCount . HasValue )
179160 return ;
180161
181- Scenes = GetScenes ( ) ;
182162 Scene = FrameIndex ?? 0 ;
183163 NumberScenes = FrameCount ?? 1 ;
164+
165+ if ( FrameIndex . HasValue && ( ! FrameCount . HasValue || FrameCount . Value == 1 ) )
166+ Scenes = FrameIndex . Value . ToString ( CultureInfo . InvariantCulture ) ;
167+ else
168+ Scenes = string . Format ( CultureInfo . InvariantCulture , "{0}-{1}" , Scene , Scene + NumberScenes ) ;
184169 }
185170
186171 private void Copy ( IMagickReadSettings < QuantumType > settings )
0 commit comments