File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -11,21 +11,24 @@ fn main() {
11
11
let mut gray = img. into_luma8 ( ) ;
12
12
13
13
// Apply mask
14
- let mask = ImageReader :: open ( path. join ( "mask_14x14.gif" ) ) . unwrap ( )
15
- . decode ( ) . unwrap ( )
14
+ let mask = ImageReader :: open ( path. join ( "mask_14x14.gif" ) )
15
+ . unwrap ( )
16
+ . decode ( )
17
+ . unwrap ( )
16
18
. into_luma8 ( ) ;
17
19
18
20
for ( x, y, mask_pixel) in mask. enumerate_pixels ( ) {
19
21
let mask_value = mask_pixel[ 0 ] ;
20
22
let mut gray_pixel = gray. get_pixel ( x, y) . clone ( ) ;
21
23
if mask_value == 0 {
22
- gray_pixel = image:: Luma ( [ 0 ] ) ;
24
+ gray_pixel = image:: Luma ( [ 0 ] ) ;
23
25
} else {
24
- gray_pixel. invert ( ) ;
26
+ gray_pixel. invert ( ) ;
25
27
}
26
28
gray. put_pixel ( x, y, gray_pixel) ;
27
29
}
28
30
29
31
let glyph_path = std:: path:: PathBuf :: from ( "glyphs" ) ;
30
- gray. save_with_format ( glyph_path. join ( "home_nano_nbgl.png" ) , ImageFormat :: Png ) . unwrap ( ) ;
32
+ gray. save_with_format ( glyph_path. join ( "home_nano_nbgl.png" ) , ImageFormat :: Png )
33
+ . unwrap ( ) ;
31
34
}
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ pub fn ui_menu_main(_: &mut Comm) -> NbglHomeAndSettings {
26
26
#[ cfg( any( target_os = "stax" , target_os = "flex" ) ) ]
27
27
const FERRIS : NbglGlyph = NbglGlyph :: from_include ( include_gif ! ( "glyphs/crab_64x64.gif" , NBGL ) ) ;
28
28
#[ cfg( any( target_os = "nanosplus" , target_os = "nanox" ) ) ]
29
- const FERRIS : NbglGlyph = NbglGlyph :: from_include ( include_gif ! ( "glyphs/home_nano_nbgl.png" , NBGL ) ) ;
30
-
29
+ const FERRIS : NbglGlyph =
30
+ NbglGlyph :: from_include ( include_gif ! ( "glyphs/home_nano_nbgl.png" , NBGL ) ) ;
31
31
32
32
let settings_strings = [ [ "Display Memo" , "Allow display of transaction memo." ] ] ;
33
33
let mut settings: Settings = Default :: default ( ) ;
You can’t perform that action at this time.
0 commit comments