Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
186 views
in Technique[技术] by (71.8m points)

javascript - 用pngjs编写PNG不会显示一些像素[关闭](Writing a PNG in pngjs doesn't show some pixels [closed])

When I'm adding a pixel at a specific location in pngjs, and save it to a file using fs, the pixels added do not show.

(当我在pngjs中的特定位置添加像素,并使用fs将其保存到文件时,添加的像素不显示。)

I expected it to make an image with a few small green and red pixels, however this was not the case.

(我希望它制作的图像带有少量绿色和红色小像素,但是事实并非如此。)

No error messages.

(没有错误讯息。)

I'm running Node.JS 12.9.1, using the latest version of pngjs on npm.

(我正在npm上使用最新版本的pngjs运行Node.JS 12.9.1。)


Here's my code

(这是我的代码)

  ask by IdiotJS translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...