MCLGIFColorTable
enum MCLGIFColorTable {}
How the colors in the GIF should be computed.
-
Compute the color table dynamically based on the frames.
This is the default, and yields better visual quality than kMCLGIFColorTableFixed but a bit slower. Visually this should be about the same as kMCLGIFColorTableAnalyze, performance depends a bit on the specific recording, but should be roughly equal, but with less memory use.
Declaration
Objective-C
kMCLGIFColorTableDynamic = MCL_GIF_COLOR_TABLE_DYNAMIC
Swift
case dynamic = 0
-
Use a fixed color palette.
This is the fastest option, but usually doens’t look as good if the recording contains a lot of nuanced colors or gradients.
Declaration
Objective-C
kMCLGIFColorTableFixed = MCL_GIF_COLOR_TABLE_FIXED
Swift
case fixed = 1
-
Compute the color table by analyzing the frames first.
This is a bit slower than kMCLGIFColorTableFixed, but results in better reproduction of the colors. This value is iOS only, the two others will give the same results on iOS and Android.
Declaration
Objective-C
kMCLGIFColorTableAnalyzeFirst = MCL_GIF_COLOR_TABLE_ANALYZE_FIRST
Swift
case analyzeFirst = 2