From ab3d396d3f089eb6b91dfc78293d1d800b36af78 Mon Sep 17 00:00:00 2001 From: javl Date: Sat, 15 Aug 2026 09:53:16 +0200 Subject: [PATCH] Do not allow images sizes below 1 x 1 px --- index.html | 4 ++-- js/script.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index bcbe87b..6753b39 100644 --- a/index.html +++ b/index.html @@ -68,8 +68,8 @@

or paste byte array


- x - px + x + px
Set this to the size of your image.
Common sizes: 16x16, 32x32, 64x48, 128x32, 128x64.
diff --git a/js/script.js b/js/script.js index de86ee4..e0847f2 100644 --- a/js/script.js +++ b/js/script.js @@ -702,7 +702,7 @@ function handleImageSelection(evt) { w.type = 'number'; w.name = 'width'; w.id = 'screenWidth'; - w.min = 0; + w.min = 1; w.className = 'size-input'; w.value = img.width; settings.screenWidth = img.width; @@ -716,7 +716,7 @@ function handleImageSelection(evt) { h.type = 'number'; h.name = 'height'; h.id = 'screenHeight'; - h.min = 0; + h.min = 1; h.className = 'size-input'; h.value = img.height; settings.screenHeight = img.height;