package camlimages
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8a36e7d5636358db533de71e55533fc8118444c607355b68357e0e619f3ab1d4
md5=956fc1942a4b4c5da473ddcd9c9d028b
doc/camlimages.core/Bitmap/index.html
Module Bitmap
Bitmaps used in images.
Bitmaps are partitioned into blocks. Usually only one block is allocated for one image, but for huge images, they needs more.
val debug : bool ref
val maximum_live : int ref
val maximum_block_size : int ref
Configuration parameters for image swapping.
You can specify the maximum size of live data by setting maximum_live
in words. If the size of live data in heap exceeds maximum_live
, then Camlimages library tries to escape part of image buffer into "swap" files. If swapped data are required, they are read back into memory. This swapping is automatically done by the camlimages library. If maximum_live
is 0, image swapping is disabled.
Swapped images are separated into block shaped "partitions". maximum_block_size
is a maximum size of each partition, also in words. This parameter may affect the swapping performance. There is no theory (yet) how we should specify it. The author of the library propose to have (!maximum_live / 10). If it is larger, each swapping becomes slower. If smaller, more swappings will occur. Too large and too small maximum_block_size, both may make the program slower.
If you use image swapping, you need to explicitly call destroy
function of each image format (Rgb24.destroy, image#destroy, etc...) to free the memory and swap files of the needless images.
The defaults are both 0. (i.e. swapping is disabled )
module Block : sig ... end
module type Bitdepth = sig ... end