÷
createImageData() ImageData transparent black
ImageData е RGBA
transparent black (0,0,0,0)
color/alpha С ImageData Си ImageDataObject.data.length
color/alpha 洢 ImageData data С
е color/alpha putImageData()
ImageData е
imgData=ctx.createImageData(100,100); imgData.data[0]=255; imgData.data[1]=0; imgData.data[2]=0; imgData.data[3]=255;ImageData е
imgData=ctx.createImageData(100,100); imgData.data[4]=0; imgData.data[5]=255; imgData.data[6]=0; imgData.data[7]=255; JavaScript汾 createImageData()
1. 磨 ImageData
var imgData=context.createImageData(width,height);2. ImageData ImageData
var imgData=context.createImageData(imageData);width ImageData
height ImageData
imageData ImageData