Skip to content

Commit

Permalink
(NT-72) Default to 32 bit images (4 8 bit channels)
Browse files Browse the repository at this point in the history
  • Loading branch information
s1hofmann committed Mar 27, 2024
1 parent 77994c1 commit e61dcb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/nut.js/lib/provider/io/jimp-image-reader.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class implements ImageReader {
jimpImage.bitmap.width,
jimpImage.bitmap.height,
jimpImage.bitmap.data,
jimpImage.hasAlpha() ? 4 : 3,
4,
parameters,
jimpImage.bitmap.data.length /
(jimpImage.bitmap.width * jimpImage.bitmap.height),
Expand Down
4 changes: 2 additions & 2 deletions providers/libnut/lib/libnut-screen.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class ScreenAction implements ScreenProviderInterface {
new Image(
screenShot.width,
screenShot.height,
screenShot.image.slice(0, screenShot.width * screenShot.height * 4),
screenShot.image,
4,
"grabScreenResult",
screenShot.bitsPerPixel,
Expand Down Expand Up @@ -62,7 +62,7 @@ export default class ScreenAction implements ScreenProviderInterface {
new Image(
screenShot.width,
screenShot.height,
screenShot.image.slice(0, screenShot.width * screenShot.height * 4),
screenShot.image,
4,
"grabScreenRegionResult",
screenShot.bitsPerPixel,
Expand Down

0 comments on commit e61dcb7

Please sign in to comment.