From e874b6183934be340a2028a26b65d2ddc594aa17 Mon Sep 17 00:00:00 2001 From: 2-4601 Date: Sat, 9 Apr 2016 14:57:52 +0300 Subject: [PATCH] Fix typo of quality argument in image compression The quality value should be a float in the range 0.0 to 1.0. Other values (e.g. 50) are discarded silently and a default is used. Fixes #713 // FREEBIE --- js/views/file_input_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/views/file_input_view.js b/js/views/file_input_view.js index a886ea2c..b8a01435 100644 --- a/js/views/file_input_view.js +++ b/js/views/file_input_view.js @@ -101,8 +101,8 @@ canvas.toDataURL('image/jpeg', quality) ); quality = quality * maxSize / blob.size; - if (quality < 50) { - quality = 50; + if (quality < 0.5) { + quality = 0.5; } } while (i > 0 && blob.size > maxSize);