Module GdkPixbuf

module GdkPixbuf: sig .. end
Object for manipulating image data
GTK documentation: index


The GdkPixbuf Structure


type pixbuf = [ `pixbuf ] Gobject.obj 
GTK documentation: gdk-pixbuf-gdk-pixbuf
type colorspace = [ `RGB ] 
type alpha_mode = [ `BILEVEL | `FULL ] 
type interpolation = [ `BILINEAR | `HYPER | `NEAREST | `TILES ] 
type gdkpixbuferror = 
| ERROR_CORRUPT_IMAGE
| ERROR_INSUFFICIENT_MEMORY
| ERROR_BAD_OPTION
| ERROR_UNKNOWN_TYPE
| ERROR_UNSUPPORTED_OPERATION
| ERROR_FAILED
exception GdkPixbufError of gdkpixbuferror * string
val set_marshal_use_rle : bool -> unit

Creation


val create : width:int ->
height:int ->
?bits:int ->
?colorspace:colorspace ->
?has_alpha:bool -> unit -> pixbuf
GTK documentation: gdk-pixbuf-creating
val cast : 'a Gobject.obj -> pixbuf
val copy : pixbuf -> pixbuf
val subpixbuf : pixbuf ->
src_x:int -> src_y:int -> width:int -> height:int -> pixbuf
val from_file : string -> pixbuf
GTK documentation: gdk-pixbuf-file-loading
val get_file_info : string -> string * int * int
Since GTK 2.4
val from_file_at_size : string -> width:int -> height:int -> pixbuf
Since GTK 2.4
GTK documentation: gdk-pixbuf-file-loading
val from_xpm_data : string array -> pixbuf
val from_data : width:int ->
height:int ->
?bits:int ->
?rowstride:int -> ?has_alpha:bool -> Gpointer.region -> pixbuf
val get_from_drawable : dest:pixbuf ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?src_x:int ->
?src_y:int -> ?colormap:Gdk.colormap -> [> `drawable ] Gobject.obj -> unit
GTK documentation: gdk-Pixbufs

Accessors


val get_n_channels : pixbuf -> int
val get_has_alpha : pixbuf -> bool
val get_bits_per_sample : pixbuf -> int
val get_width : pixbuf -> int
val get_height : pixbuf -> int
val get_rowstride : pixbuf -> int
val get_pixels : pixbuf -> Gpointer.region

Rendering


val draw_pixbuf : [> `drawable ] Gobject.obj ->
Gdk.gc ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?dither:Gdk.Tags.rgb_dither ->
?x_dither:int ->
?y_dither:int -> ?src_x:int -> ?src_y:int -> pixbuf -> unit
GTK documentation: gdk-Drawing-Primitives
val render_to_drawable : [> `drawable ] Gobject.obj ->
?gc:Gdk.gc ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?dither:Gdk.Tags.rgb_dither ->
?x_dither:int ->
?y_dither:int -> ?src_x:int -> ?src_y:int -> pixbuf -> unit
Deprecated.use GdkPixbuf.draw_pixbuf
GTK documentation: gdk-Pixbufs
val render_alpha : Gdk.bitmap ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?threshold:int -> ?src_x:int -> ?src_y:int -> pixbuf -> unit
GTK documentation: gdk-Pixbufs
val render_to_drawable_alpha : [> `drawable ] Gobject.obj ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?alpha:alpha_mode ->
?threshold:int ->
?dither:Gdk.Tags.rgb_dither ->
?x_dither:int ->
?y_dither:int -> ?src_x:int -> ?src_y:int -> pixbuf -> unit
Deprecated.use GdkPixbuf.draw_pixbuf
GTK documentation: gdk-Pixbufs
val create_pixmap : ?threshold:int -> pixbuf -> Gdk.pixmap * Gdk.bitmap option
GTK documentation: gdk-Pixbufs

Transform


val add_alpha : ?transparent:int * int * int -> pixbuf -> pixbuf
GTK documentation: gdk-pixbuf-util
val fill : pixbuf -> int32 -> unit
GTK documentation: gdk-pixbuf-util
val saturate_and_pixelate : dest:pixbuf ->
saturation:float -> pixelate:bool -> pixbuf -> unit
GTK documentation: gdk-pixbuf-util
val copy_area : dest:pixbuf ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int -> ?src_x:int -> ?src_y:int -> pixbuf -> unit
GTK documentation: gdk-pixbuf-util
val scale : dest:pixbuf ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?ofs_x:float ->
?ofs_y:float ->
?scale_x:float ->
?scale_y:float -> ?interp:interpolation -> pixbuf -> unit
GTK documentation: gdk-pixbuf-scaling
val composite : dest:pixbuf ->
alpha:int ->
?dest_x:int ->
?dest_y:int ->
?width:int ->
?height:int ->
?ofs_x:float ->
?ofs_y:float ->
?scale_x:float ->
?scale_y:float -> ?interp:interpolation -> pixbuf -> unit
GTK documentation: gdk-pixbuf-scaling

Saving


val save : filename:string ->
typ:string -> ?options:(string * string) list -> pixbuf -> unit
GTK documentation: gdk-pixbuf-file-saving
val save_to_callback : pixbuf ->
typ:string -> ?options:(string * string) list -> (string -> unit) -> unit
Since GTK 2.4
val save_to_buffer : pixbuf ->
typ:string -> ?options:(string * string) list -> Buffer.t -> unit
Since GTK 2.4