I had made a codePen demo to show this case(and 2 screen-capture-images below)
https://codepen.io/tomleader/pen/jOmNWJG
There are 3 buttons(click to see the result)
1. use img: The most common way , sprite.from(imgUrl), everything is ok!
2. use buffer: a little tricky.. the process is [new a Image obj and set src=url, draw Image to another canvas, getImageData from canvas, make a texture from imgData buffer, sprite.from(texture)], and the result seems weird!
3. use dataUrl: the process is [new a Image obj and set src=url, draw Image to another canvas, canvas.toDataURL, make a texture from dataURL, sprite.from(texture)], and the result seems ok!
So I think maybe the fromBuffer(imgdata) lost some pixels opacity data? OR I have some mistakes in my code? Any suggestions? Thanks ..