@@ -50,15 +50,13 @@ export default function MonochromeMergeClient() {
5050
5151 const processImageData = (
5252 imageData : ImageData ,
53- isLight : boolean
53+ isLight : boolean ,
5454 ) : ImageData => {
5555 const { data, width, height } = imageData ;
5656
5757 const histogram = new Array ( 256 ) . fill ( 0 ) ;
5858 for ( let i = 0 ; i < data . length ; i += 4 ) {
59- const grayscale = Math . round (
60- ( data [ i ] + data [ i + 1 ] + data [ i + 2 ] ) / 3
61- ) ;
59+ const grayscale = Math . round ( ( data [ i ] + data [ i + 1 ] + data [ i + 2 ] ) / 3 ) ;
6260 histogram [ grayscale ] ++ ;
6361 }
6462
@@ -121,7 +119,7 @@ export default function MonochromeMergeClient() {
121119 if ( ! lightCtx ) return ;
122120 const lightScale = Math . min (
123121 maxWidth / lightImg . width ,
124- maxHeight / lightImg . height
122+ maxHeight / lightImg . height ,
125123 ) ;
126124 const lightNewWidth = lightImg . width * lightScale ;
127125 const lightNewHeight = lightImg . height * lightScale ;
@@ -132,7 +130,7 @@ export default function MonochromeMergeClient() {
132130 lightX ,
133131 lightY ,
134132 lightNewWidth ,
135- lightNewHeight
133+ lightNewHeight ,
136134 ) ;
137135 const lightScaledData = lightCtx . getImageData ( 0 , 0 , maxWidth , maxHeight ) ;
138136
@@ -144,7 +142,7 @@ export default function MonochromeMergeClient() {
144142 if ( ! darkCtx ) return ;
145143 const darkScale = Math . min (
146144 maxWidth / darkImg . width ,
147- maxHeight / darkImg . height
145+ maxHeight / darkImg . height ,
148146 ) ;
149147 const darkNewWidth = darkImg . width * darkScale ;
150148 const darkNewHeight = darkImg . height * darkScale ;
0 commit comments