开发者

Image Pixel Array without first drawing into main Canvas?

Do you have to first draw any source images into the canvas before you can obtain the pixel array data? or is there a better way? such as having a second hidden canvas?

I am using several images that I will mash together, and draw into the main canvas. What开发者_JAVA百科 is the best way to obtain to say backgroundData, objectsData, effectsData, from bg.png, obj.png, fx.png? without first showing them in the main canvas.


I believe (99%, not 100%) you have to draw them to Canvas to get any of the data properties.

That said, you could draw them to a temporary, hidden canvas that you create on the fly and kill when you're done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜