mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-16 21:29:58 +01:00
Parse floating-point value from percentages (#1733)
* Parse floating-point value from percentages * Add tests for resize module * Add options' test for resize module Co-authored-by: Aditya Zope <zope@Adityas-MacBook-Pro.local> Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@ const imagejs = require('imagejs'),
|
||||
pixelSetter = require('../../util/pixelSetter'),
|
||||
ndarray = require('ndarray');
|
||||
module.exports = function Resize(pixels, options) {
|
||||
const resize_value = parseInt(options.resize.slice(0, -1));
|
||||
const resize_value = parseFloat(options.resize);
|
||||
|
||||
if (resize_value == 100) return pixels;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user