Module Jpeg_loader


module Jpeg_loader: sig .. end
JPEG image loader


type image_color_space =
| JCS_RGB (*red/green/blue*)
| JCS_GRAYSCALE (*monochrome*)
| JCS_CMYK (*C/M/Y/K*)
| JCS_YCbCr (*Y/Cb/Cr (also known as YUV)*)
| JCS_YCCK (*Y/Cb/Cr/K*)
| JCS_UNKNOWN (*error/unspecified*)

type img_input =
| Filename of string
| Buffer of string
val load_img : img_input ->
(int, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Genarray.t *
int * int * int * image_color_space

The 3 additionnal integers are width, height and the number of color_components.
val assert_size : width:int -> height:int -> unit

Checks if the dimensions of the image are compatible with OpenGL.