p5.Image 객체를 생성합니다.
createImage() 함수는 width와 height 매개변수를 사용하여 새 p5.Image 객체의 픽셀 단위의 크기를 설정합니다 새 p5.Image는 pixels 배열을 업데이트하거나 get()과 set() 메서드(Method)를 호출함으로써 수정할 수 있습니다. 픽셀 값을 읽거나 수정하기 전에 loadPixels() 메서드를 호출해야 합니다. 변경 사항을 적용하려면 updatePixels() 메서드를 호출해야 합니다.
참고: 새 p5.Image 객체는 기본적으로 투명합니다.
예제
구문
createImage(width, height)
매개변수
width
Integer:
픽셀 단위의 너비.
height
Integer:
픽셀 단위의 높이.
Returns
p5.Image: 새로운 p5.Image 객체.
This page is generated from the comments in src/image/image.js . Please feel free to edit it and submit a pull request!