Skip to content

Commit

Permalink
fix: image resizing for streamdeck mini
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Mar 8, 2021
1 parent 0bae9b2 commit 71a5165
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class CompanionSatelliteClient extends EventEmitter<CompanionSatelliteCli
}

private initSocket(): void {
const socket = this.socket = new Socket()
const socket = (this.socket = new Socket())
this.socket.on('error', (e) => {
this.emit('error', e)
})
Expand Down Expand Up @@ -178,7 +178,7 @@ export class CompanionSatelliteClient extends EventEmitter<CompanionSatelliteCli
this.receiveBuffer = Buffer.concat([this.receiveBuffer, data])

let ignoredBytes = 0

while (this.receiveBuffer.length > 0) {
const header = Protocol.readHeader(this.receiveBuffer)

Expand Down
2 changes: 1 addition & 1 deletion src/devices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export class DeviceManager {
let newbuffer: Buffer | null = null
try {
newbuffer = await sharp(buffer, { raw: { width: 72, height: 72, channels: 3 } })
.resize(96, 96)
.resize(sd.ICON_SIZE, sd.ICON_SIZE)
.raw()
.toBuffer()
} catch (e) {
Expand Down

0 comments on commit 71a5165

Please sign in to comment.