'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved .TH mlib_ImageScale2_Inp 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions" .SH NAME mlib_ImageScale2_Inp \- linear scaling, in place .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ] #include \fBmlib_status\fR \fBmlib_ImageScale2_Inp\fR(\fBmlib_image *\fR\fIsrcdst\fR, \fBconst mlib_d64 *\fR\fIalpha\fR, \fBconst mlib_d64 *\fR\fIbeta\fR); .fi .SH DESCRIPTION .sp .LP The \fBmlib_ImageScale2_Inp()\fR function performs an in-place linear scaling on the pixels of the source image by multiplying the data by a scale factor and then adding an offset. Images can have 1, 2, 3, or 4 channels. .sp .LP The following equation is used: .sp .in +2 .nf srcdst[x][y][i] = srcdst[x][y][i] * alpha[i] + beta[i] .fi .in -2 .sp .LP If the result of the operation underflows/overflows the minimum/maximum value supported by the destination image, then it will be clamped to the minimum/maximum value respectively. .sp .LP The image can be of type \fBMLIB_BYTE\fR, \fBMLIB_SHORT\fR, \fBMLIB_USHORT\fR or \fBMLIB_INT\fR. .SH PARAMETERS .sp .LP The function takes the following arguments: .sp .ne 2 .mk .na \fB\fIsrcdst\fR\fR .ad .RS 10n .rt Pointer to source and destination image. .RE .sp .ne 2 .mk .na \fB\fIalpha\fR\fR .ad .RS 10n .rt Scaling factor. \fBalpha[i]\fR contains the scaling factor for channel \fBi\fR. .RE .sp .ne 2 .mk .na \fB\fIbeta\fR\fR .ad .RS 10n .rt Offset value. \fBbeta[i]\fR contains the offset for channel \fBi\fR. .RE .SH RETURN VALUES .sp .LP The function returns \fBMLIB_SUCCESS\fR if successful. Otherwise it returns \fBMLIB_FAILURE\fR. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBmlib_ImageScale\fR(3MLIB), \fBmlib_ImageScale_Fp\fR(3MLIB), \fBmlib_ImageScale_Fp_Inp\fR(3MLIB), \fBmlib_ImageScale_Inp\fR(3MLIB), \fBmlib_ImageScale2\fR(3MLIB), \fBattributes\fR(5)