diff --git a/index.html b/index.html
index 1292154..532b873 100644
--- a/index.html
+++ b/index.html
@@ -39,6 +39,9 @@
+
+
+
diff --git a/script.js b/script.js
index a062296..57f462b 100644
--- a/script.js
+++ b/script.js
@@ -41,14 +41,15 @@ document.addEventListener('DOMContentLoaded', function () {
const width = document.getElementById("width")?.value || "1080";
const height = document.getElementById("height")?.value || "1080";
const minBorder = document.getElementById("min-border")?.value || "16";
+ const antiAliasing = document.getElementById("anti-aliasing").checked;
Array.from(files).forEach((file) => {
- uploadAndProcessImage(file, { color, width, height, minBorder });
+ uploadAndProcessImage(file, { color, width, height, minBorder, antiAliasing });
});
});
function uploadAndProcessImage(file, options) {
- const { color, width, height, minBorder } = options;
+ const { color, width, height, minBorder, antiAliasing } = options;
// Create progress bar elements
const progressWrapper = document.createElement('div');
@@ -79,7 +80,7 @@ document.addEventListener('DOMContentLoaded', function () {
const xhr = new XMLHttpRequest();
- xhr.open('POST', `https://api.nevets.tech/igformatter/upload?color=${encodeURIComponent(color)}&width=${encodeURIComponent(width)}&height=${encodeURIComponent(height)}&minBorder=${encodeURIComponent(minBorder)}`, true);
+ xhr.open('POST', `https://api.nevets.tech/igformatter/upload?color=${encodeURIComponent(color)}&width=${encodeURIComponent(width)}&height=${encodeURIComponent(height)}&minBorder=${encodeURIComponent(minBorder)}&antiAliasing=${encodeURIComponent(antiAliasing)}`, true);
xhr.responseType = 'blob';
// Upload progress event