t be 4,096 to 9,437,184.");
            return;
          }
          if (ratio < 0.4 || ratio > 2.5) {
            setError("Aspect ratio must be between 1:2.5 and 2.5:1.");
            return;
          }

          validImage = true;
          preview.src = URL.createObjectURL(file);
          preview.style.display = "block";
        };
        tempImg.onerror = () => {
          setError("Could not read this file. Please try another image.");
        };
        tempImg.src = URL.createObjectURL(file);
 