|
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;
|
15 | 16 | using SixLabors.ImageSharp.Formats.Qoi;
|
16 | 17 | using SixLabors.ImageSharp.Formats.Tga;
|
17 | 18 | using SixLabors.ImageSharp.Formats.Tiff;
|
| 19 | +using SixLabors.ImageSharp.Formats.Tiff.Compression.Decompressors; |
18 | 20 | using SixLabors.ImageSharp.Formats.Webp;
|
19 | 21 | using SixLabors.ImageSharp.Memory;
|
20 | 22 | using SixLabors.ImageSharp.PixelFormats;
|
@@ -130,6 +132,7 @@ private static void Seed<TPixel>()
|
130 | 132 | AotCompileImageDecoderInternals<TPixel>();
|
131 | 133 | AotCompileImageEncoders<TPixel>();
|
132 | 134 | AotCompileImageDecoders<TPixel>();
|
| 135 | + AotCompileSpectralConverter<TPixel>(); |
133 | 136 | AotCompileImageProcessors<TPixel>();
|
134 | 137 | AotCompileGenericImageProcessors<TPixel>();
|
135 | 138 | AotCompileResamplers<TPixel>();
|
@@ -269,6 +272,17 @@ private static void AotCompileImageDecoders<TPixel>()
|
269 | 272 | AotCompileImageDecoder<TPixel, TiffDecoder>();
|
270 | 273 | }
|
271 | 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 | + |
272 | 286 | /// <summary>
|
273 | 287 | /// This method pre-seeds the <see cref="IImageEncoder"/> in the AoT compiler.
|
274 | 288 | /// </summary>
|
|
0 commit comments