|
10 | 10 | using SixLabors.ImageSharp.Formats.Gif; |
11 | 11 | using SixLabors.ImageSharp.Formats.Jpeg; |
12 | 12 | using SixLabors.ImageSharp.Formats.Jpeg.Components; |
| 13 | +using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder; |
13 | 14 | using SixLabors.ImageSharp.Formats.Pbm; |
14 | 15 | using SixLabors.ImageSharp.Formats.Png; |
| 16 | +using SixLabors.ImageSharp.Formats.Qoi; |
15 | 17 | using SixLabors.ImageSharp.Formats.Tga; |
16 | 18 | using SixLabors.ImageSharp.Formats.Tiff; |
| 19 | +using SixLabors.ImageSharp.Formats.Tiff.Compression.Decompressors; |
17 | 20 | using SixLabors.ImageSharp.Formats.Webp; |
18 | 21 | using SixLabors.ImageSharp.Memory; |
19 | 22 | using SixLabors.ImageSharp.PixelFormats; |
@@ -129,6 +132,7 @@ private static void Seed<TPixel>() |
129 | 132 | AotCompileImageDecoderInternals<TPixel>(); |
130 | 133 | AotCompileImageEncoders<TPixel>(); |
131 | 134 | AotCompileImageDecoders<TPixel>(); |
| 135 | + AotCompileSpectralConverter<TPixel>(); |
132 | 136 | AotCompileImageProcessors<TPixel>(); |
133 | 137 | AotCompileGenericImageProcessors<TPixel>(); |
134 | 138 | AotCompileResamplers<TPixel>(); |
@@ -195,39 +199,41 @@ private static void AotCompileImageProcessingContextFactory<TPixel>() |
195 | 199 | => default(DefaultImageOperationsProviderFactory).CreateImageProcessingContext<TPixel>(default, default, default); |
196 | 200 |
|
197 | 201 | /// <summary> |
198 | | - /// This method pre-seeds the all <see cref="IImageEncoderInternals"/> in the AoT compiler. |
| 202 | + /// This method pre-seeds the all core encoders in the AoT compiler. |
199 | 203 | /// </summary> |
200 | 204 | /// <typeparam name="TPixel">The pixel format.</typeparam> |
201 | 205 | [Preserve] |
202 | 206 | private static void AotCompileImageEncoderInternals<TPixel>() |
203 | 207 | where TPixel : unmanaged, IPixel<TPixel> |
204 | 208 | { |
205 | | - default(WebpEncoderCore).Encode<TPixel>(default, default, default); |
206 | 209 | default(BmpEncoderCore).Encode<TPixel>(default, default, default); |
207 | 210 | default(GifEncoderCore).Encode<TPixel>(default, default, default); |
208 | 211 | default(JpegEncoderCore).Encode<TPixel>(default, default, default); |
209 | 212 | default(PbmEncoderCore).Encode<TPixel>(default, default, default); |
210 | 213 | default(PngEncoderCore).Encode<TPixel>(default, default, default); |
| 214 | + default(QoiEncoderCore).Encode<TPixel>(default, default, default); |
211 | 215 | default(TgaEncoderCore).Encode<TPixel>(default, default, default); |
212 | 216 | default(TiffEncoderCore).Encode<TPixel>(default, default, default); |
| 217 | + default(WebpEncoderCore).Encode<TPixel>(default, default, default); |
213 | 218 | } |
214 | 219 |
|
215 | 220 | /// <summary> |
216 | | - /// This method pre-seeds the all <see cref="IImageDecoderInternals"/> in the AoT compiler. |
| 221 | + /// This method pre-seeds the all <see cref="ImageDecoderCore"/> in the AoT compiler. |
217 | 222 | /// </summary> |
218 | 223 | /// <typeparam name="TPixel">The pixel format.</typeparam> |
219 | 224 | [Preserve] |
220 | 225 | private static void AotCompileImageDecoderInternals<TPixel>() |
221 | 226 | where TPixel : unmanaged, IPixel<TPixel> |
222 | 227 | { |
223 | | - default(WebpDecoderCore).Decode<TPixel>(default, default); |
224 | | - default(BmpDecoderCore).Decode<TPixel>(default, default); |
225 | | - default(GifDecoderCore).Decode<TPixel>(default, default); |
226 | | - default(JpegDecoderCore).Decode<TPixel>(default, default); |
227 | | - default(PbmDecoderCore).Decode<TPixel>(default, default); |
228 | | - default(PngDecoderCore).Decode<TPixel>(default, default); |
229 | | - default(TgaDecoderCore).Decode<TPixel>(default, default); |
230 | | - default(TiffDecoderCore).Decode<TPixel>(default, default); |
| 228 | + default(BmpDecoderCore).Decode<TPixel>(default, default, default); |
| 229 | + default(GifDecoderCore).Decode<TPixel>(default, default, default); |
| 230 | + default(JpegDecoderCore).Decode<TPixel>(default, default, default); |
| 231 | + default(PbmDecoderCore).Decode<TPixel>(default, default, default); |
| 232 | + default(PngDecoderCore).Decode<TPixel>(default, default, default); |
| 233 | + default(QoiDecoderCore).Decode<TPixel>(default, default, default); |
| 234 | + default(TgaDecoderCore).Decode<TPixel>(default, default, default); |
| 235 | + default(TiffDecoderCore).Decode<TPixel>(default, default, default); |
| 236 | + default(WebpDecoderCore).Decode<TPixel>(default, default, default); |
231 | 237 | } |
232 | 238 |
|
233 | 239 | /// <summary> |
@@ -266,6 +272,17 @@ private static void AotCompileImageDecoders<TPixel>() |
266 | 272 | AotCompileImageDecoder<TPixel, TiffDecoder>(); |
267 | 273 | } |
268 | 274 |
|
| 275 | + [Preserve] |
| 276 | + private static void AotCompileSpectralConverter<TPixel>() |
| 277 | + where TPixel : unmanaged, IPixel<TPixel> |
| 278 | + { |
| 279 | + default(SpectralConverter<TPixel>).GetPixelBuffer(default); |
| 280 | + default(GrayJpegSpectralConverter<TPixel>).GetPixelBuffer(default); |
| 281 | + default(RgbJpegSpectralConverter<TPixel>).GetPixelBuffer(default); |
| 282 | + default(TiffJpegSpectralConverter<TPixel>).GetPixelBuffer(default); |
| 283 | + default(TiffOldJpegSpectralConverter<TPixel>).GetPixelBuffer(default); |
| 284 | + } |
| 285 | + |
269 | 286 | /// <summary> |
270 | 287 | /// This method pre-seeds the <see cref="IImageEncoder"/> in the AoT compiler. |
271 | 288 | /// </summary> |
|
0 commit comments