Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dubzzz/camllight-read-save-bitmap
Read and save 24-bit images in Caml-Light
https://github.com/dubzzz/camllight-read-save-bitmap
Last synced: about 1 month ago
JSON representation
Read and save 24-bit images in Caml-Light
- Host: GitHub
- URL: https://github.com/dubzzz/camllight-read-save-bitmap
- Owner: dubzzz
- License: mit
- Created: 2014-03-27T15:05:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-27T16:04:08.000Z (over 10 years ago)
- Last Synced: 2024-05-02T00:04:27.689Z (7 months ago)
- Language: OCaml
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
camllight-read-save-bitmap
==========================Project
-------This project is divided into two Caml-Light files:
1. importBMP.ml
2. exportBMP.mlThe data-structure used is a rectangular matrix containing intergers. Each element in the matrix represents a pixel which color is 0xRRGGBB (in hexadecimal notation).
Sample code for opening 24-bit images:
```ocaml
include "../src/importBMP.ml";;
let image_in = importBMP "in.bmp" in
(* ...your code... *)
```Sample code for saving 24-bit images:
```ocaml
include "../src/exportBMP.ml";;
let image_out = make_matrix x y 0 in
(* ...your code... *)
exportBMP image_out "out.bmp";;
```Possible Modifications
----------------------Support of other kind of bitmaps:
- 32-bit images
- indexed imagesOther projects
--------------
[My Portfolio](http://portfolio.dubien.me/)