Skip to content

Commit 8ef1dc8

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents 172825e + 758b417 commit 8ef1dc8

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

core/nut.js/lib/provider/io/jimp-image-reader.class.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default class implements ImageReader {
2424
jimpImage.bitmap.width,
2525
jimpImage.bitmap.height,
2626
jimpImage.bitmap.data,
27-
jimpImage.hasAlpha() ? 4 : 3,
27+
4,
2828
parameters,
2929
jimpImage.bitmap.data.length /
3030
(jimpImage.bitmap.width * jimpImage.bitmap.height),

core/shared/lib/objects/rgba.class.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ export class RGBA {
44
public readonly G: number,
55
public readonly B: number,
66
public readonly A: number
7-
) {}
7+
) {
8+
}
89

910
public toString(): string {
10-
return `rgb(${this.R},${this.G},${this.B})`;
11+
return `rgba(${this.R},${this.G},${this.B},${this.A})`;
1112
}
1213

1314
public toHex(): string {

providers/libnut/lib/libnut-screen.class.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("libnut screen action", () => {
3636
colorAt: jest.fn(),
3737
height: screenShotSize.height,
3838
image: Buffer.from(
39-
new Array(screenShotSize.width * screenShotSize.height * 4 + 10).fill(
39+
new Array(screenShotSize.width * screenShotSize.height * 4).fill(
4040
0
4141
)
4242
),
@@ -72,7 +72,7 @@ describe("libnut screen action", () => {
7272
colorAt: jest.fn(),
7373
height: screenShotSize.height,
7474
image: Buffer.from(
75-
new Array(screenShotSize.width * screenShotSize.height * 4 + 10).fill(
75+
new Array(screenShotSize.width * screenShotSize.height * 4).fill(
7676
0
7777
)
7878
),

providers/libnut/lib/libnut-screen.class.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default class ScreenAction implements ScreenProviderInterface {
3030
new Image(
3131
screenShot.width,
3232
screenShot.height,
33-
screenShot.image.slice(0, screenShot.width * screenShot.height * 4),
33+
screenShot.image,
3434
4,
3535
"grabScreenResult",
3636
screenShot.bitsPerPixel,
@@ -62,7 +62,7 @@ export default class ScreenAction implements ScreenProviderInterface {
6262
new Image(
6363
screenShot.width,
6464
screenShot.height,
65-
screenShot.image.slice(0, screenShot.width * screenShot.height * 4),
65+
screenShot.image,
6666
4,
6767
"grabScreenRegionResult",
6868
screenShot.bitsPerPixel,

0 commit comments

Comments
 (0)