Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何获取像素信息?好像没有接口嘛! #243

Open
fettliu opened this issue Jan 4, 2022 · 1 comment
Open

如何获取像素信息?好像没有接口嘛! #243

fettliu opened this issue Jan 4, 2022 · 1 comment

Comments

@fettliu
Copy link

fettliu commented Jan 4, 2022

有一个toBuffer,实际确实encode,只管感觉应该是转成Uint8Array之类的

@fettliu
Copy link
Author

fettliu commented Jan 5, 2022

找到了一个方法绘制像素,就是这性能不会好了
const images = require("images")
var img=new images(200,200)
var dot=new images(1,1)
dot.fill(0,255,255)
img.draw(dot, 100,100)
img.save("draw.png")

建议提供直接的内存画点函数drawPixel,然后就可以加个图形库了,moveto,lineto,rect,drawText……

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant