diff --git a/.github/workflows/snapshot_release.yaml b/.github/workflows/snapshot_release.yaml index 1b77ac8f..dd8bf8ea 100644 --- a/.github/workflows/snapshot_release.yaml +++ b/.github/workflows/snapshot_release.yaml @@ -74,10 +74,3 @@ jobs: run: pnpm run publish:next env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - uses: actions/setup-node@v3 - with: - registry-url: "https://npm.pkg.github.com" - - name: Publish snapshot release to GPR - run: npm run publish:next - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tagged_release.yaml b/.github/workflows/tagged_release.yaml index e8263c95..51aa34c4 100644 --- a/.github/workflows/tagged_release.yaml +++ b/.github/workflows/tagged_release.yaml @@ -68,10 +68,3 @@ jobs: run: pnpm run publish:release env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - uses: actions/setup-node@v3 - with: - registry-url: "https://npm.pkg.github.com" - - name: Publish tagged release to GPR - run: pnpm run publish:release - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/core/nut.js/lib/provider/io/jimp-image-reader.class.ts b/core/nut.js/lib/provider/io/jimp-image-reader.class.ts index c29baac2..c360106f 100644 --- a/core/nut.js/lib/provider/io/jimp-image-reader.class.ts +++ b/core/nut.js/lib/provider/io/jimp-image-reader.class.ts @@ -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), diff --git a/core/shared/lib/objects/rgba.class.ts b/core/shared/lib/objects/rgba.class.ts index 95f0df32..8b46c173 100644 --- a/core/shared/lib/objects/rgba.class.ts +++ b/core/shared/lib/objects/rgba.class.ts @@ -4,10 +4,11 @@ export class RGBA { public readonly G: number, public readonly B: number, public readonly A: number - ) {} + ) { + } public toString(): string { - return `rgb(${this.R},${this.G},${this.B})`; + return `rgba(${this.R},${this.G},${this.B},${this.A})`; } public toHex(): string { diff --git a/providers/libnut/lib/libnut-screen.class.spec.ts b/providers/libnut/lib/libnut-screen.class.spec.ts index d8feb6e5..527e003f 100644 --- a/providers/libnut/lib/libnut-screen.class.spec.ts +++ b/providers/libnut/lib/libnut-screen.class.spec.ts @@ -36,7 +36,7 @@ describe("libnut screen action", () => { colorAt: jest.fn(), height: screenShotSize.height, image: Buffer.from( - new Array(screenShotSize.width * screenShotSize.height * 4 + 10).fill( + new Array(screenShotSize.width * screenShotSize.height * 4).fill( 0 ) ), @@ -72,7 +72,7 @@ describe("libnut screen action", () => { colorAt: jest.fn(), height: screenShotSize.height, image: Buffer.from( - new Array(screenShotSize.width * screenShotSize.height * 4 + 10).fill( + new Array(screenShotSize.width * screenShotSize.height * 4).fill( 0 ) ), diff --git a/providers/libnut/lib/libnut-screen.class.ts b/providers/libnut/lib/libnut-screen.class.ts index 20f986e0..0a0e7448 100644 --- a/providers/libnut/lib/libnut-screen.class.ts +++ b/providers/libnut/lib/libnut-screen.class.ts @@ -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, @@ -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,