JavaScript 㧠File ãªãã¸ã§ã¯ãã¨ãã¦ä¿æãããç»åãã¡ã¤ã«ã®ãµã¤ãºï¼å¹ ã»é«ãï¼ãåå¾ããæ¹æ³ã«ã¤ãã¦ã§ãã Node ã§ã¯ãªãã¯ã©ã¤ã¢ã³ããµã¤ãã® JavaScript ã§ã®ã話ã§ãã æ©éçµè«ã§ããã Image ãªãã¸ã§ã¯ããçæã㦠src ã«ãã®ãã¡ã¤ã«ã®ä¸èº«ãã»ãããã onload ã³ã¼ã«ããã¯ãå¼ã°ããã¨ãã«ãµã¤ãºãåå¾ããã° OK ã§ãã const img = new Image(); img.onload = () => { // ããã§ãµã¤ãºãåå¾ã§ãã const size = { width: img.naturalWidth, height: img.naturalHeight, }; URL.revokeObjectURL(img.src); console.log(size); }; img.src = URL.createObjectUR
{{#tags}}- {{label}}
{{/tags}}