@@ -321,9 +321,9 @@ mod test {
321
321
let ( width_new, height_new) = image_calibrated. dimensions ( ) ;
322
322
dbg ! ( width, width_new, height, height_new) ;
323
323
324
- let Bgra ( [ _, _, _, a ] ) = image. get_pixel ( width / 2 , 0 ) ;
325
- dbg ! ( a ) ;
326
- if a == 0 {
324
+ let Bgra ( [ _, _, _, alpha ] ) = image. get_pixel ( width / 2 , 0 ) ;
325
+ dbg ! ( alpha ) ;
326
+ if alpha == 0 {
327
327
// if that pixel was full transparent, for example on ubuntu / GNOME, caused by the drop shadow
328
328
// then we expect the calibrated image to be smaller and cropped by this area
329
329
assert ! ( api. margin. is_some( ) ) ;
@@ -379,13 +379,13 @@ mod test {
379
379
let win = api. get_active_window ( ) ?;
380
380
let image_raw = api. capture_window_screenshot ( win) ?;
381
381
let image: View < _ , Bgra < u8 > > = image_raw. as_view ( ) . unwrap ( ) ;
382
- let ( w , h ) = image. dimensions ( ) ;
382
+ let ( width , height ) = image. dimensions ( ) ;
383
383
384
- let Bgra ( [ b , g , r , a ] ) = image. get_pixel ( w / 2 , h / 2 ) ;
385
- assert_ne ! ( b , 0 ) ;
386
- assert_ne ! ( g , 0 ) ;
387
- assert_ne ! ( r , 0 ) ;
388
- assert_ne ! ( a , 0 , "alpha is unexpected" ) ;
384
+ let Bgra ( [ blue , green , red , alpha ] ) = image. get_pixel ( width / 2 , height / 2 ) ;
385
+ assert_ne ! ( blue , 0 ) ;
386
+ assert_ne ! ( green , 0 ) ;
387
+ assert_ne ! ( red , 0 ) ;
388
+ assert_ne ! ( alpha , 0 , "alpha is unexpected" ) ;
389
389
390
390
// Note: visual validation is sometimes helpful:
391
391
// let file = format!("frame-{}.tga", win);
0 commit comments