1 .\" Title: \fBlqr_carver_bias_add_area\fR
2 .\" Author: Carlo Baldassi
3 .\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
5 .\" Manual: LqR library API reference
6 .\" Source: LqR library 0.4.0 API (3:0:3)
8 .TH "\FBLQR_CARVER_BIAS_ADD_AREA\FR" "3" "16 Apr 2009" "LqR library 0.4.0 API (3:0:3)" "LqR library API reference"
9 .\" disable hyphenation
11 .\" disable justification (adjust text to left margin only)
14 lqr_carver_bias_add_area, lqr_carver_bias_add, lqr_carver_bias_add_rgb_area, lqr_carver_bias_add_rgb \- update an LqrCarver bias
23 .BI "LqrRetVal lqr_carver_bias_add_area(LqrCarver*\ " "carver" ", gdouble*\ " "buffer" ", gint\ " "bias_factor" ", gint\ " "width" ", gint\ " "height" ", gint\ " "x_off" ", gint\ " "y_off" ");"
25 .BI "LqrRetVal lqr_carver_bias_add(LqrCarver*\ " "carver" ", gdouble*\ " "buffer" ", gint\ " "bias_factor" ");"
27 .BI "LqrRetVal lqr_carver_bias_add_rgb_area(LqrCarver*\ " "carver" ", gdouble*\ " "buffer" ", gint\ " "bias_factor" ", gint\ " "channels" ", gint\ " "width" ", gint\ " "height" ", gint\ " "x_off" ", gint\ " "y_off" ");"
29 .BI "LqrRetVal lqr_carver_bias_add_rgb(LqrCarver*\ " "carver" ", gdouble*\ " "buffer" ", gint\ " "bias_factor" ", gint\ " "channels" ");"
30 .SH "ADDING A BIAS FROM A BUFFER"
33 \fBlqr_carver_bias_add_area\fR
34 adds a bias to an area of the image loaded into the
37 \fIcarver\fR\&. A positive biased area will be more likely to be avoided by seams, and thus be preserved during rescaling, while a negative bias has the opposite effect\&.
39 This function must be called after
40 \fBlqr_carver_init\fR(3)
42 \fBlqr_carver_resize\fR(3)\&. If called multiple times, the biases added at each call will sum up\&.
46 must point to an array of
49 \fIwidth\fR * \fIheight\fR, ordered first by rows, then by columns\&.
51 The offset of the area relative to the image can be specified through
54 \fIy_off\fR\&. The bias area can exceed the boundary of the image, and the offsets can be negative\&.
58 is an overall bias scale\&. A typical value when the buffer contents are of the order of
64 \fBlqr_carver_bias_add\fR
65 can be used when the area to add is of the same size of the image loaded in the
67 object and the offsets are
69 .SH "ADDING A BIAS FROM AN IMAGE"
72 \fBlqr_carver_bias_add_rgb_area\fR
74 \fBlqr_carver_bias_add_rgb\fR
76 \fBlqr_carver_bias_add_area\fR
78 \fBlqr_carver_bias_add\fR, except that they use 8\-bit multi\-channel images as inputs\&.
80 The number of channels in the image is passed via the parameter
81 \fIchannels\fR\&. The last channel is assumed to be the alpha (opacity) channel if
87 (if this is not the case, use the previous functions)\&.
89 The bias is computed from the average of the colour channels, multiplied by the value of the alpha channel if present\&. For example, in RGBA images a white, nontransparent pixel is equivalent to a value of
91 when using a buffer in
92 \fBlqr_carver_bias_add_area\fR\&.
95 The return values follow the Liquid Rescale library signalling system\&.
99 \fBLqrRetVal\fR(3), \fBlqr_carver_init\fR(3), \fBlqr_carver_rigmask_add_area\fR(3)
101 Copyright \(co 2007-2009 Carlo Baldassi