How to read a bitmap in OCAML?

后端 未结 4 1075
情歌与酒
情歌与酒 2021-01-13 00:34

I want to read a bitmap file (from the file system) using OCAML and store the pixels (the colors) inside an array which have th dimension of the bitmap, each pixel will take

4条回答
  •  终归单人心
    2021-01-13 01:13

    If you don't want to use CAMLIMAGE, usually raw RGB or PNM/PPM (which have an easy to create header format followed by RGB values) images are used. ImageMagick allows you to then view this formats or convert them into more usable formats.

提交回复
热议问题