mirror of
https://github.com/javl/image2cpp.git
synced 2026-09-11 09:03:04 +00:00
Do not allow images sizes below 1 x 1 px
This commit is contained in:
+2
-2
@@ -68,8 +68,8 @@
|
||||
<h2 class="sub-section-title">or paste byte array</h2>
|
||||
<textarea id="byte-input" class="byte-input"></textarea><br />
|
||||
<div class="text-input-size">
|
||||
<input type="number" min="0" id="text-input-width" class="size-input" value="128" /> x
|
||||
<input type="number" min="0" id="text-input-height" class="size-input" value="64" /> px
|
||||
<input type="number" min="1" id="text-input-width" class="size-input" value="128" /> x
|
||||
<input type="number" min="1" id="text-input-height" class="size-input" value="64" /> px
|
||||
</div>
|
||||
<div class="note">Set this to the size of your image.<br>Common sizes: <a href="#" class="size-preset" onclick="setTextInputSize(16, 16); return false;"><code>16x16</code></a>, <a href="#" class="size-preset" onclick="setTextInputSize(32, 32); return false;"><code>32x32</code></a>, <a href="#" class="size-preset" onclick="setTextInputSize(64, 48); return false;"><code>64x48</code></a>, <a href="#" class="size-preset" onclick="setTextInputSize(128, 32); return false;"><code>128x32</code></a>, <a href="#" class="size-preset" onclick="setTextInputSize(128, 64); return false;"><code>128x64</code></a>.</div>
|
||||
<div>
|
||||
|
||||
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user