Check Image Resolution

PHOTO EMBED

Mon Oct 09 2023 07:42:33 GMT+0000 (Coordinated Universal Time)

Saved by @Samarmhamed78

checkResolution(file) { //check resolution function
          if (  file.type === 'image/svg+xml') {
            const img = new Image();
            img.src = window.URL.createObjectURL(file);
            img.onload = () => {
              let width = img.naturalWidth,
                height = img.naturalHeight;
                if ((width >= 640 && height >= 480) && (width <= 2700 && height <= 1500)) {

                }
          }
      }
    }
content_copyCOPY