Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.
* Some parts of this feature may have varying levels of support.
ImageData 인터페이스는 <canvas> 엘리먼트 영역의 기저의 픽셀데이터를 나타냅니다ImageData()생성자나 canvas객체에 연결된 CanvasRenderingContext2D객체의 createImageData()나 getImageData()메소드로 생성할 수 있습니다. ImageData는 putImageData()의 인자로 전달할 수 있으며, 이를 통해 canvas의 일부로 반영할 수 있습니다.
인자로 주어진 Uint8ClampedArray로 부터 해당 크기에 맞는 ImageData객체를 생성합니다. 만약 인자가 주어지지 않으면 검정색 사각형 이미지를 생성합니다. createImageData()는 worker에서 사용할 수 없기 때문에, ImageData의 생성자를 이용하는 것이 가장 일반적인 방법입니다.
Uint8ClampedArray형식이며 1차원 배열로 RGBA순서로 정의된 이미지 데이터를 나타내니다. 각 원소는 정수값으로 0에서 255사이의 값을 갖습니다.
ImageData.height 읽기 전용unsigned long형식으로 ImageData의 pixel기준의 실제 높이값입니다.
ImageData.width 읽기 전용unsigned long형식으로 ImageData의 pixel기준의 실제 가로값입니다.
| HTML # imagedata |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023년 7월 30일 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.