package camlimages
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=b8203da78a9733488e40fafccfafb874c9ebafd8a5f1fa1d9a46ae2ac241e97a
md5=7dd5aa1944d01d2e908d4caa1e1bba78
doc/camlimages.core/Bitmap/index.html
Module Bitmap
Source
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.
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 )