Removed width and height check for file split

This commit is contained in:
Dennis Postma 2025-04-06 03:46:52 +02:00
parent b884487ec9
commit 1ca54ce7f7

View File

@ -133,17 +133,13 @@
// Load the image to check its dimensions
const img = new Image();
img.onload = () => {
// If the image is large enough, it might be a spritesheet
// This is a simple heuristic - we can improve it later
if (img.width > 200 && img.height > 200) {
// Ask the user if they want to split the spritesheet
if (confirm('This looks like it might be a spritesheet. Would you like to split it into individual sprites?')) {
// Open the spritesheet splitter
spritesheetImageUrl.value = url;
spritesheetImageFile.value = file;
isSpritesheetSplitterOpen.value = true;
return;
}
// Ask the user if they want to split the spritesheet
if (confirm('This looks like it might be a spritesheet. Would you like to split it into individual sprites?')) {
// Open the spritesheet splitter
spritesheetImageUrl.value = url;
spritesheetImageFile.value = file;
isSpritesheetSplitterOpen.value = true;
return;
}
// If the user doesn't want to split or it's not large enough, process as a single sprite