Skip to content

Commit efb03a6

Browse files
committed
fix: Fix ColorTableMode parameter of Gif encoder in release build
In the release build, the GifEncoder.ColorTableMode property in the ImageSharp library has been renamed to FrameColorTableMode. This change ensures the code compiles correctly and generates GIF images under the release configuration.
1 parent 2758c95 commit efb03a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Utils/ServerStreamWriterExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using Grpc.Core;
33
using SixLabors.ImageSharp;
44
#if RELEASE
5+
using SixLabors.ImageSharp.Formats;
56
using SixLabors.ImageSharp.Formats.Gif;
67
using SixLabors.ImageSharp.Processing;
78
#endif
@@ -35,7 +36,7 @@ internal async Task WriteToResponseAsync(Image image, bool isAnime)
3536
GifEncoder encoder = new()
3637
{
3738
Quantizer = KnownQuantizers.Wu,
38-
ColorTableMode = GifColorTableMode.Local
39+
ColorTableMode = FrameColorTableMode.Local
3940
};
4041
await image.SaveAsGifAsync(outStream, encoder);
4142
}

0 commit comments

Comments
 (0)