In the Haxe programming language, is there any cross-language way to save an array of pixel data to a file (e. g., in BMP or PNG format)?

```
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]]
      ];
  }
}

```