jimp-dev/jimp

Support Uint8ClampedArray

Open

#912 建立於 2020年7月17日

在 GitHub 查看
 (2 留言) (14 反應) (0 負責人)JavaScript (785 fork)batch import
enhancementhelp wanted

倉庫指標

Star
 (13,218 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I want to be able to load and save images using a Uint8ClampedArray. Such array stores the red, green, blue and alpha of each pixel in the image from left to right, then top to bottom. This is similar to how image.bitmap.data works.

Describe the solution you'd like A clear and concise description of what you want to happen.

Support passing a Uint8ClampedArray to Jimp.create and add image.getUint8ClampedArray().

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Manually parsing them, adding each pixel one at a time to the image.

Additional context Add any other context or screenshots about the feature request here.

貢獻者指南