BC-LifeHash-CLI TypeScript Library - v1.0.0-alpha.20
    Preparing search index...

    Function writeImage

    • Writes a LifeHash image to a PNG file.

      Port of write_image() from lifehash.cpp lines 174-186 and PNGWriter class from png-writer.hpp.

      Parameters

      • image: Image

        The LifeHash image to write

      • filename: string

        The output filename

      Returns void

      import { makeFromUtf8 } from "@bcts/lifehash";

      const image = makeFromUtf8("Hello");
      writeImage(image, "Hello.png");