Update Auto-Image.js

This commit is contained in:
jamz-uk committed 2025-08-21 22:50:16 +01:00
1 parent fd5e7bfc80
commit b8a634b654
1 file changed
+9 -1
+9 -1
View File
@@ -4955,6 +4955,10 @@
heightSlider.value = Math.round(parseInt(widthSlider.value, 10) / aspectRatio);
}
_updateResizePreview();
const curW = parseInt(widthSlider.value, 10);
const curH = parseInt(heightSlider.value, 10);
state.resizeSettings = { baseWidth: width, baseHeight: height, width: curW, height: curH };
saveBotSettings();
};
const onHeightInput = () => {
@@ -4962,6 +4966,10 @@
widthSlider.value = Math.round(parseInt(heightSlider.value, 10) * aspectRatio);
}
_updateResizePreview();
const curW = parseInt(widthSlider.value, 10);
const curH = parseInt(heightSlider.value, 10);
state.resizeSettings = { baseWidth: width, baseHeight: height, width: curW, height: curH };
saveBotSettings();
};
paintWhiteToggle.onchange = (e) => {
@@ -5080,7 +5088,7 @@
state.totalPixels = totalValidPixels;
state.paintedPixels = 0;
state.resizeSettings = { baseWidth: newWidth, baseHeight: newHeight, width: newWidth, height: newHeight };
state.resizeSettings = { baseWidth: width, baseHeight: height, width: newWidth, height: newHeight };
saveBotSettings();
const finalImageBitmap = await createImageBitmap(tempCanvas);