New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

browser-image-resizer

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browser-image-resizer - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

8

build/index.js

@@ -68,3 +68,3 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.default =

if (canvas.width > maxWidth) {
canvas = scaleCanvasWithAlgorithm(canvas, config);
canvas = scaleCanvasWithAlgorithm(canvas, Object.assign(config, { outputWidth: maxWidth }));
}

@@ -80,3 +80,3 @@

var ratio = canvas.width / canvas.height;
var mWidth = Math.min(config.maxWidth, ratio * config.maxHeight);
var mWidth = Math.min(canvas.width, config.maxWidth, ratio * config.maxHeight);
if (

@@ -88,3 +88,3 @@ config.maxSize > 0 &&

mWidth,
Math.floor(Math.sqrt(config.maxSize * ratio)));
Math.floor(config.maxSize * 1000 / canvas.height));

@@ -194,3 +194,3 @@ if (!!config.scaleRatio)

var scale = config.maxWidth / canvas.width;
var scale = config.outputWidth / canvas.width;

@@ -197,0 +197,0 @@ scaledCanvas.width = canvas.width * scale;

{
"name": "browser-image-resizer",
"version": "1.1.3",
"version": "1.1.4",
"description": "A browser-based utility to downscale and resize images using <canvas>",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -68,3 +68,3 @@ import EXIF from './exif';

if (canvas.width > maxWidth) {
canvas = scaleCanvasWithAlgorithm(canvas, config);
canvas = scaleCanvasWithAlgorithm(canvas, Object.assign(config, { outputWidth: maxWidth }));
}

@@ -80,3 +80,3 @@

var ratio = canvas.width / canvas.height;
var mWidth = Math.min(config.maxWidth, ratio * config.maxHeight);
var mWidth = Math.min(canvas.width, config.maxWidth, ratio * config.maxHeight);
if (

@@ -88,3 +88,3 @@ config.maxSize > 0 &&

mWidth,
Math.floor(Math.sqrt(config.maxSize * ratio))
Math.floor(config.maxSize * 1000 / canvas.height)
);

@@ -194,3 +194,3 @@ if (!!config.scaleRatio)

var scale = config.maxWidth / canvas.width;
var scale = config.outputWidth / canvas.width;

@@ -197,0 +197,0 @@ scaledCanvas.width = canvas.width * scale;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc