@@ -304,7 +304,7 @@ public void Encode<TPixel>(ImageFrame<TPixel> frame, Stream stream, bool hasAnim
304
304
305
305
if ( hasAnimation )
306
306
{
307
- prevPosition = BitWriterBase . WriteAnimationFrame ( stream , new ( )
307
+ prevPosition = BitWriterBase . WriteAnimationFrame ( stream , new AnimationFrameData
308
308
{
309
309
Width = ( uint ) frame . Width ,
310
310
Height = ( uint ) frame . Height ,
@@ -547,7 +547,7 @@ private CrunchConfig[] EncoderAnalyze(ReadOnlySpan<uint> bgra, int width, int he
547
547
EntropyIx entropyIdx = this . AnalyzeEntropy ( bgra , width , height , usePalette , this . PaletteSize , this . TransformBits , out redAndBlueAlwaysZero ) ;
548
548
549
549
bool doNotCache = false ;
550
- List < CrunchConfig > crunchConfigs = new ( ) ;
550
+ List < CrunchConfig > crunchConfigs = new List < CrunchConfig > ( ) ;
551
551
552
552
if ( this . method == WebpEncodingMethod . BestQuality && this . quality == 100 )
553
553
{
@@ -641,8 +641,8 @@ private void EncodeImage(int width, int height, bool useCache, CrunchConfig conf
641
641
Vp8LBackwardRefs refsTmp = this . Refs [ refsBest . Equals ( this . Refs [ 0 ] ) ? 1 : 0 ] ;
642
642
643
643
this . bitWriter . Reset ( bwInit ) ;
644
- Vp8LHistogram tmpHisto = new ( cacheBits ) ;
645
- List < Vp8LHistogram > histogramImage = new ( histogramImageXySize ) ;
644
+ Vp8LHistogram tmpHisto = new Vp8LHistogram ( cacheBits ) ;
645
+ List < Vp8LHistogram > histogramImage = new List < Vp8LHistogram > ( histogramImageXySize ) ;
646
646
for ( int i = 0 ; i < histogramImageXySize ; i ++ )
647
647
{
648
648
histogramImage . Add ( new Vp8LHistogram ( cacheBits ) ) ;
@@ -839,9 +839,9 @@ private void EncodeImageNoHuffman(Span<uint> bgra, Vp8LHashChain hashChain, Vp8L
839
839
refsTmp1 ,
840
840
refsTmp2 ) ;
841
841
842
- List < Vp8LHistogram > histogramImage = new ( )
842
+ List < Vp8LHistogram > histogramImage = new List < Vp8LHistogram >
843
843
{
844
- new ( cacheBits )
844
+ new Vp8LHistogram ( cacheBits )
845
845
} ;
846
846
847
847
// Build histogram image and symbols from backward references.
@@ -941,7 +941,7 @@ private void StoreFullHuffmanCode(Span<HuffmanTree> huffTree, HuffmanTreeToken[]
941
941
int i ;
942
942
byte [ ] codeLengthBitDepth = new byte [ WebpConstants . CodeLengthCodes ] ;
943
943
short [ ] codeLengthBitDepthSymbols = new short [ WebpConstants . CodeLengthCodes ] ;
944
- HuffmanTreeCode huffmanCode = new ( )
944
+ HuffmanTreeCode huffmanCode = new HuffmanTreeCode
945
945
{
946
946
NumSymbols = WebpConstants . CodeLengthCodes ,
947
947
CodeLengths = codeLengthBitDepth ,
@@ -1192,7 +1192,7 @@ private EntropyIx AnalyzeEntropy(ReadOnlySpan<uint> bgra, int width, int height,
1192
1192
histo [ ( int ) HistoIx . HistoBluePred * 256 ] ++ ;
1193
1193
histo [ ( int ) HistoIx . HistoAlphaPred * 256 ] ++ ;
1194
1194
1195
- Vp8LBitEntropy bitEntropy = new ( ) ;
1195
+ Vp8LBitEntropy bitEntropy = new Vp8LBitEntropy ( ) ;
1196
1196
for ( int j = 0 ; j < ( int ) HistoIx . HistoTotal ; j ++ )
1197
1197
{
1198
1198
bitEntropy . Init ( ) ;
@@ -1318,7 +1318,7 @@ private bool AnalyzeAndCreatePalette(ReadOnlySpan<uint> bgra, int width, int hei
1318
1318
/// <returns>The number of palette entries.</returns>
1319
1319
private static int GetColorPalette ( ReadOnlySpan < uint > bgra , int width , int height , Span < uint > palette )
1320
1320
{
1321
- HashSet < uint > colors = new ( ) ;
1321
+ HashSet < uint > colors = new HashSet < uint > ( ) ;
1322
1322
for ( int y = 0 ; y < height ; y ++ )
1323
1323
{
1324
1324
ReadOnlySpan < uint > bgraRow = bgra . Slice ( y * width , width ) ;
0 commit comments