package camlimages
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=fea0bbb53746a29fb546946d34d43ed0907db8326ff95004a11f7ea666f8d541
    
    
  md5=c06eec6b0e12a993d4677203e733512a
    
    
  doc/camlimages.core/Genimage/MakeIndexed/index.html
Module Genimage.MakeIndexed
Parameters
module RI : Image_intf.RAWIMAGE with type elt = intmodule CON : Image_intf.CONTAINER_INDEXED with type rawimage = RI.tSignature
include Image_intf.IMAGE with type t = CON.container with type elt = int
type t = CON.containerImage creation
val create : int -> int -> tcreate w h creates an image with a size wxh. The content is the image is not initialized.
make w h c creates an image with a size wxh. The content is the image is initialized to the color c.
val destroy : t -> unitdestroy t explicitly frees the image content of t. If you do not use bitmap swap files, you do not need to call this function, since GC will free unreachable image data automatically. Read bitmap.mli for more details.
Pixel access
get t x y gets image pixel of t at x,y. If x,y is outside of the image size, Images.Out_of_image exception is raised.
set t x y c sets image pixel of t at x,y by the color c. If x,y is outside of the image size, Images.Out_of_image exception is raised.
Unsafe versions of get and set. It does not perform any image boundary check. If the coordinates are out of the given image, the result is undefined. Use carefully.
Image copy
sub t x y w h duplicates a subimage of t of size wxh, whose origin (0,0) is at (x,y) of t.
blit src x y dst x' y' w h copies rectangular area of src at x,y with size wxh, to an image dst. The origin of the subimage comes at x',y' of dst.
map f src x y dst x' y' w h maps pixels of the rectangular area of src at x,y with size wxh, to an image dst, using color conversion function f. The origin of the subimage comes at x',y' of dst.
val dump : t -> bytesfunctions for internal use
val unsafe_access : t -> int -> int -> bytes * intval get_strip : t -> int -> int -> int -> bytesval set_strip : t -> int -> int -> int -> bytes -> unitval get_scanline : t -> int -> bytesval get_scanline_ptr : t -> (int -> (bytes * int) * int) optionval set_scanline : t -> int -> bytes -> unitval blocks : t -> int * intval dump_block : t -> int -> int -> Bitmap.Block.ttype mapelt = CON.mapeltPixel access
get_color x y returns image pixel color value of t at x,y. If x,y is outside of the image size, Images.Out_of_image exception is raised.