在 Haxe 编程语言中,是否有任何跨语言的方式将像素数据数组保存到文件中(例如,以 BMP 或 PNG 格式)?
class SavePixelsToFile {
static function main(){
//how can I save this array of pixel data to a file? It is a simple 2D array of RGB arrays, with the red, green, and blue components in the respective order.
var arr = [
[[0, 0, 0],[255, 255, 255]],
[[255, 255, 255],[0, 0, 0]]
];
}
}