11// Copyright (c) Six Labors.
22// Licensed under the Six Labors Split License.
33
4- using System . Diagnostics ;
54using SixLabors . ImageSharp . Formats . Ico ;
65using SixLabors . ImageSharp . PixelFormats ;
76using static SixLabors . ImageSharp . Tests . TestImages . Ico ;
@@ -42,6 +41,16 @@ public void IcoDecoder_Decode(TestImageProvider<Rgba32> provider)
4241 [ WithFile ( Bpp1Size9x9 , PixelTypes . Rgba32 ) ]
4342 [ WithFile ( Bpp1TranspNotSquare , PixelTypes . Rgba32 ) ]
4443 [ WithFile ( Bpp1TranspPartial , PixelTypes . Rgba32 ) ]
44+ public void Bpp1Test ( TestImageProvider < Rgba32 > provider )
45+ {
46+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
47+
48+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
49+
50+ // TODO: Assert metadata, frame count, etc
51+ }
52+
53+ [ Theory ]
4554 [ WithFile ( Bpp24Size15x15 , PixelTypes . Rgba32 ) ]
4655 [ WithFile ( Bpp24Size16x16 , PixelTypes . Rgba32 ) ]
4756 [ WithFile ( Bpp24Size17x17 , PixelTypes . Rgba32 ) ]
@@ -61,6 +70,16 @@ public void IcoDecoder_Decode(TestImageProvider<Rgba32> provider)
6170 [ WithFile ( Bpp24TranspNotSquare , PixelTypes . Rgba32 ) ]
6271 [ WithFile ( Bpp24TranspPartial , PixelTypes . Rgba32 ) ]
6372 [ WithFile ( Bpp24Transp , PixelTypes . Rgba32 ) ]
73+ public void Bpp24Test ( TestImageProvider < Rgba32 > provider )
74+ {
75+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
76+
77+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
78+
79+ // TODO: Assert metadata, frame count, etc
80+ }
81+
82+ [ Theory ]
6483 [ WithFile ( Bpp32Size15x15 , PixelTypes . Rgba32 ) ]
6584 [ WithFile ( Bpp32Size16x16 , PixelTypes . Rgba32 ) ]
6685 [ WithFile ( Bpp32Size17x17 , PixelTypes . Rgba32 ) ]
@@ -80,6 +99,16 @@ public void IcoDecoder_Decode(TestImageProvider<Rgba32> provider)
8099 [ WithFile ( Bpp32TranspNotSquare , PixelTypes . Rgba32 ) ]
81100 [ WithFile ( Bpp32TranspPartial , PixelTypes . Rgba32 ) ]
82101 [ WithFile ( Bpp32Transp , PixelTypes . Rgba32 ) ]
102+ public void Bpp32Test ( TestImageProvider < Rgba32 > provider )
103+ {
104+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
105+
106+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
107+
108+ // TODO: Assert metadata, frame count, etc
109+ }
110+
111+ [ Theory ]
83112 [ WithFile ( Bpp4Size15x15 , PixelTypes . Rgba32 ) ]
84113 [ WithFile ( Bpp4Size16x16 , PixelTypes . Rgba32 ) ]
85114 [ WithFile ( Bpp4Size17x17 , PixelTypes . Rgba32 ) ]
@@ -98,6 +127,16 @@ public void IcoDecoder_Decode(TestImageProvider<Rgba32> provider)
98127 [ WithFile ( Bpp4Size9x9 , PixelTypes . Rgba32 ) ]
99128 [ WithFile ( Bpp4TranspNotSquare , PixelTypes . Rgba32 ) ]
100129 [ WithFile ( Bpp4TranspPartial , PixelTypes . Rgba32 ) ]
130+ public void Bpp4Test ( TestImageProvider < Rgba32 > provider )
131+ {
132+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
133+
134+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
135+
136+ // TODO: Assert metadata, frame count, etc
137+ }
138+
139+ [ Theory ]
101140 [ WithFile ( Bpp8Size15x15 , PixelTypes . Rgba32 ) ]
102141 [ WithFile ( Bpp8Size16x16 , PixelTypes . Rgba32 ) ]
103142 [ WithFile ( Bpp8Size17x17 , PixelTypes . Rgba32 ) ]
@@ -116,28 +155,82 @@ public void IcoDecoder_Decode(TestImageProvider<Rgba32> provider)
116155 [ WithFile ( Bpp8Size9x9 , PixelTypes . Rgba32 ) ]
117156 [ WithFile ( Bpp8TranspNotSquare , PixelTypes . Rgba32 ) ]
118157 [ WithFile ( Bpp8TranspPartial , PixelTypes . Rgba32 ) ]
158+ public void Bpp8Test ( TestImageProvider < Rgba32 > provider )
159+ {
160+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
161+
162+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
163+
164+ // TODO: Assert metadata, frame count, etc
165+ }
166+
167+ [ Theory ]
119168 [ WithFile ( InvalidAll , PixelTypes . Rgba32 ) ]
120- [ WithFile ( IcoFake , PixelTypes . Rgba32 ) ]
121169 [ WithFile ( InvalidBpp , PixelTypes . Rgba32 ) ]
122170 [ WithFile ( InvalidCompression , PixelTypes . Rgba32 ) ]
123171 [ WithFile ( InvalidPng , PixelTypes . Rgba32 ) ]
124172 [ WithFile ( InvalidRLE4 , PixelTypes . Rgba32 ) ]
125173 [ WithFile ( InvalidRLE8 , PixelTypes . Rgba32 ) ]
174+ public void InvalidTest ( TestImageProvider < Rgba32 > provider )
175+ {
176+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
177+
178+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
179+
180+ // TODO: Assert metadata, frame count, etc
181+ }
182+
183+ [ Theory ]
126184 [ WithFile ( MixedBmpPngA , PixelTypes . Rgba32 ) ]
127185 [ WithFile ( MixedBmpPngB , PixelTypes . Rgba32 ) ]
128186 [ WithFile ( MixedBmpPngC , PixelTypes . Rgba32 ) ]
187+ public void MixedBmpPngTest ( TestImageProvider < Rgba32 > provider )
188+ {
189+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
190+
191+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
192+
193+ // TODO: Assert metadata, frame count, etc
194+ }
195+
196+ [ Theory ]
129197 [ WithFile ( MultiSizeA , PixelTypes . Rgba32 ) ]
130198 [ WithFile ( MultiSizeB , PixelTypes . Rgba32 ) ]
131199 [ WithFile ( MultiSizeC , PixelTypes . Rgba32 ) ]
132200 [ WithFile ( MultiSizeD , PixelTypes . Rgba32 ) ]
133201 [ WithFile ( MultiSizeE , PixelTypes . Rgba32 ) ]
134202 [ WithFile ( MultiSizeF , PixelTypes . Rgba32 ) ]
203+ public void MultiSizeTest ( TestImageProvider < Rgba32 > provider )
204+ {
205+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
206+
207+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
208+
209+ // TODO: Assert metadata, frame count, etc
210+ }
211+
212+ [ Theory ]
135213 [ WithFile ( MultiSizeMultiBitsA , PixelTypes . Rgba32 ) ]
136214 [ WithFile ( MultiSizeMultiBitsB , PixelTypes . Rgba32 ) ]
137215 [ WithFile ( MultiSizeMultiBitsC , PixelTypes . Rgba32 ) ]
138216 [ WithFile ( MultiSizeMultiBitsD , PixelTypes . Rgba32 ) ]
139- public void IcoDecoder_Decode2 ( TestImageProvider < Rgba32 > provider )
217+ public void MultiSizeMultiBitsTest ( TestImageProvider < Rgba32 > provider )
218+ {
219+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
220+
221+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
222+
223+ // TODO: Assert metadata, frame count, etc
224+ }
225+
226+ [ Theory ]
227+ [ WithFile ( IcoFake , PixelTypes . Rgba32 ) ]
228+ public void IcoFakeTest ( TestImageProvider < Rgba32 > provider )
140229 {
141- Debug . Assert ( false ) ;
230+ using Image < Rgba32 > image = provider . GetImage ( IcoDecoder . Instance ) ;
231+
232+ image . DebugSaveMultiFrame ( provider , extension : "png" ) ;
233+
234+ // TODO: Assert metadata, frame count, etc
142235 }
143236}
0 commit comments