@@ -12,17 +12,13 @@ use std::{
1212
1313use anyhow:: Context ;
1414use clap:: Parser ;
15- #[ cfg( feature = "decode-from-xbm" ) ]
16- use image:: DynamicImage ;
1715use image:: { ImageFormat , imageops} ;
18- #[ cfg( feature = "decode-from-xbm" ) ]
19- use image_extras:: xbm:: XbmDecoder ;
2016#[ cfg( feature = "optimize-output-png" ) ]
2117use oxipng:: { Deflater , Options , ZopfliOptions } ;
2218use qrcode2:: { QrCode , bits:: Bits } ;
2319use rqrr:: PreparedImage ;
2420
25- #[ cfg( any ( feature = "decode-from-svg" , feature = "decode-from-xbm" ) ) ]
21+ #[ cfg( feature = "decode-from-svg" ) ]
2622use crate :: cli:: InputFormat ;
2723use crate :: {
2824 cli:: { Command , Opt , OutputFormat , Variant } ,
@@ -191,19 +187,10 @@ pub fn run() -> anyhow::Result<()> {
191187 #[ cfg( feature = "decode-from-svg" ) ]
192188 let input_format =
193189 input_format. or_else ( || is_svg:: is_svg ( & input) . then_some ( InputFormat :: Svg ) ) ;
194- #[ cfg( feature = "decode-from-xbm" ) ]
195- let input_format =
196- input_format. or_else ( || input. starts_with ( b"#define" ) . then_some ( InputFormat :: Xbm ) ) ;
197190 #[ expect( clippy:: option_if_let_else) ]
198191 let image = match input_format {
199192 #[ cfg( feature = "decode-from-svg" ) ]
200193 Some ( InputFormat :: Svg ) => decode:: from_svg ( & input) ,
201- #[ cfg( feature = "decode-from-xbm" ) ]
202- Some ( InputFormat :: Xbm ) => {
203- let decoder = XbmDecoder :: new ( Cursor :: new ( input) )
204- . context ( "could not create new XBM decoder" ) ?;
205- DynamicImage :: from_decoder ( decoder) . map_err ( anyhow:: Error :: from)
206- }
207194 format => {
208195 let format = if let Some ( f) = format {
209196 f. try_into ( )
0 commit comments