upgrade image-size to 2.0.2

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2025-05-19 11:08:09 +01:00
parent 022f85efe7
commit b97caabc35
3 changed files with 4 additions and 4 deletions

View File

@ -121,7 +121,7 @@ function processBlock(state, block, err) {
case 3: // Tile
var x = block.data.readUInt16BE(4);
var y = block.data.readUInt16BE(6);
var dimensions = require('image-size')(block.data.slice(8));
var dimensions = require('image-size').imageSize(block.data.slice(8));
//log("Tile", x, y, dimensions.width, dimensions.height, block.ptr);
//console.log(elapseSeconds);

View File

@ -4294,7 +4294,7 @@ function mainStart() {
if (passport != null) { modules.push(...passport); }
if (captcha == true) { modules.push('svg-captcha@1.4.0'); }
if (sessionRecording == true) { modules.push('image-size@1.2.1'); } // Need to get the remote desktop JPEG sizes to index the recodring file.
if (sessionRecording == true) { modules.push('image-size@2.0.2'); } // Need to get the remote desktop JPEG sizes to index the recording file.
if (config.letsencrypt != null) { modules.push('acme-client@4.2.5'); } // Add acme-client module. We need to force v4.2.4 or higher since olver versions using SHA-1 which is no longer supported by Let's Encrypt.
if (config.settings.mqtt != null) { modules.push('aedes@0.39.0'); } // Add MQTT Modules
if (config.settings.mysql != null) { modules.push('mysql2@3.11.4'); } // Add MySQL.
@ -4338,7 +4338,7 @@ function mainStart() {
}
// Desktop multiplexor support
if (config.settings.desktopmultiplex === true) { modules.push('image-size@1.2.1'); }
if (config.settings.desktopmultiplex === true) { modules.push('image-size@2.0.2'); }
// SMS support
if (config.sms != null) {

View File

@ -697,7 +697,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, id, func) {
case 3: // Tile, check dimentions and store
if ((data.length < 10) || (obj.lastData == null)) break;
var x = data.readUInt16BE(4), y = data.readUInt16BE(6);
var dimensions = require('image-size')(data.slice(8));
var dimensions = require('image-size').imageSize(data.slice(8));
var sx = (x / 16), sy = (y / 16), sw = (dimensions.width / 16), sh = (dimensions.height / 16);
obj.counter++;