package camlimages
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=1c9a68bdc3d348c9f859d490dadf384926213e47a584159832f7fc4a20242865
md5=1ddba74d210b86a899b5d6565f45c2dc
doc/camlimages.core/Bitmap/Make/index.html
Module Bitmap.MakeSource
Parameters
Signature
Bitmap type
create width height initopt creates a bitmap of size width x height. You can set initopt the value to fill the bitmap.
create has no check of the size of initopt.
create_with width height initdata creates a bitmap whose initial data is initdata.
create_with has no check of the input size.
create_with_scanlines width height scanlines creates a bitmap whose initial data consists of scanlines. scanlines are raw data of each row of the image.
create_with_scanlines has no check of the input size.
access t x y is the raw access to the image buffer. It returns the byte image and its offset to the point (x,y).
access has no boundary check.
Strip access
Here, "strip" means a rectangle region with height 1. get_strip t x y w returns the bytes reprensentation of strip of t at (x, y) - (x + w - 1, y). set_strip t x y w str write str to the strip of t at (x, y) - (x + w - 1, y).
Scanline access get_scanline t y returns the bytes representation of the scanline of t at y. set_scanline t y str writes str to the scanline of t at y.
get_scanline_ptr t returns a function to get a scanline of given y coordinate and the number of scanlines between y and the bottom of the image. It returns None if the internal image partitioning cannot provide such function efficiently.
Create a bytes representation of a bitmap. It may easily raise an exception Out_of_memory for large images.
sub src x y width height returns sub-bitmap of src, at (x, y) - (x + width - 1, y + height - 1).
blit src sx sy dst dx dy width height copies the rectangle region of src at (sx, sy) - (sx + width - 1, sy + height - 1) to dst, at (dx, dy) - (dx + width - 1, dy + height - 1)