@@ -21,6 +21,7 @@ pub struct Cli {
21
21
pub no_bold : bool ,
22
22
pub image : Option < DynamicImage > ,
23
23
pub image_backend : Option < Box < dyn image_backends:: ImageBackend > > ,
24
+ pub image_colors : usize ,
24
25
pub no_merges : bool ,
25
26
pub no_color_blocks : bool ,
26
27
pub number_of_authors : usize ,
@@ -141,6 +142,16 @@ impl Cli {
141
142
. possible_values ( & possible_backends)
142
143
. help ( "Which image BACKEND to use." ) ,
143
144
)
145
+ . arg (
146
+ Arg :: with_name ( "image-colors" )
147
+ . long ( "image-colors" )
148
+ . value_name ( "NUM" )
149
+ . takes_value ( true )
150
+ . max_values ( 1 )
151
+ . possible_values ( & [ "16" , "32" , "64" , "128" , "256" ] )
152
+ . default_value ( "16" )
153
+ . help ( "NUM of colors [16, 32, 64, 128, 256] to use in image backend." ) ,
154
+ )
144
155
. arg (
145
156
Arg :: with_name ( "no-merge-commits" )
146
157
. long ( "no-merge-commits" )
@@ -215,6 +226,8 @@ impl Cli {
215
226
None
216
227
} ;
217
228
229
+ let image_colors: usize = matches. value_of ( "image-colors" ) . unwrap ( ) . parse ( ) . unwrap ( ) ;
230
+
218
231
let path = String :: from ( matches. value_of ( "input" ) . unwrap ( ) ) ;
219
232
220
233
let ascii_input = matches. value_of ( "ascii-input" ) . map ( String :: from) ;
@@ -254,6 +267,7 @@ impl Cli {
254
267
no_bold,
255
268
image,
256
269
image_backend,
270
+ image_colors,
257
271
no_merges,
258
272
no_color_blocks,
259
273
number_of_authors,
0 commit comments