| Current File : //usr/share/man/man3mlib/mlib_ImageZoomBlend.3mlib |
'\" te
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
.TH mlib_ImageZoomBlend 3MLIB "2 Mar 2007" "SunOS 5.11" "mediaLib Library Functions"
.SH NAME
mlib_ImageZoomBlend \- image scaling with alpha blending
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... \fB-lmlib\fR [ \fIlibrary\fR... ]
#include <mlib.h>
\fBmlib_status\fR \fBmlib_ImageZoomBlend\fR(\fBmlib_image *\fR\fIdst\fR, \fBconst mlib_image *\fR\fIsrc\fR,
\fBmlib_d64\fR \fIzoomx\fR, \fBmlib_d64\fR \fIzoomy\fR, \fBmlib_filter\fR \fIfilter\fR, \fBmlib_edge\fR \fIedge\fR,
\fBmlib_blend\fR \fIblend\fR, \fBmlib_s32\fR \fIalpha\fR, \fBmlib_s32\fR \fIcmask\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmlib_ImageZoomBlend()\fR function will enlarge or minify the source image by the X and Y zoom factors and blend it with the destination image.
.sp
.LP
This function is a special case of \fBmlib_ImageZoomTranslateBlend()\fR with the center of the source image being mapped to the center of the destination image.
.sp
.LP
The center of the upper-left corner pixel of an image is considered to be located at \fB(0.5, 0.5)\fR.
.sp
.LP
Both \fIsrc\fR and \fIdst\fR must be of type \fBMLIB_BYTE\fR. They can have either 3 or 4 channels.
.sp
.LP
The \fIsrc\fR image cannot have width or height larger than 32767.
.SH PARAMETERS
.sp
.LP
The function takes the following arguments:
.sp
.ne 2
.mk
.na
\fB\fIdst\fR\fR
.ad
.RS 10n
.rt
Pointer to destination image.
.RE
.sp
.ne 2
.mk
.na
\fB\fIsrc\fR\fR
.ad
.RS 10n
.rt
Pointer to first source image.
.RE
.sp
.ne 2
.mk
.na
\fB\fIzoomx\fR\fR
.ad
.RS 10n
.rt
X zoom factor. \fBzoomx > 0.0\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fIzoomy\fR\fR
.ad
.RS 10n
.rt
Y zoom factor. \fBzoomy > 0.0\fR.
.RE
.sp
.ne 2
.mk
.na
\fB\fIfilter\fR\fR
.ad
.RS 10n
.rt
Type of resampling filter. It can be one of the following:
.sp
.in +2
.nf
MLIB_NEAREST
MLIB_BILINEAR
MLIB_BICUBIC
MLIB_BICUBIC2
.fi
.in -2
.RE
.sp
.ne 2
.mk
.na
\fB\fIedge\fR\fR
.ad
.RS 10n
.rt
Type of edge condition. It can be one of the following:
.sp
.in +2
.nf
MLIB_EDGE_DST_NO_WRITE
MLIB_EDGE_DST_FILL_ZERO
MLIB_EDGE_OP_NEAREST
MLIB_EDGE_SRC_EXTEND
MLIB_EDGE_SRC_EXTEND_INDEF
MLIB_EDGE_SRC_PADDED
.fi
.in -2
.RE
.sp
.ne 2
.mk
.na
\fB\fIblend\fR\fR
.ad
.RS 10n
.rt
Type of alpha blending. It can be one of the following:
.sp
.in +2
.nf
MLIB_BLEND_GTK_SRC
MLIB_BLEND_GTK_SRC_OVER
MLIB_BLEND_GTK_SRC_OVER2
.fi
.in -2
.RE
.sp
.ne 2
.mk
.na
\fB\fIalpha\fR\fR
.ad
.RS 10n
.rt
Overall alpha for blending.
.RE
.sp
.ne 2
.mk
.na
\fB\fIcmask\fR\fR
.ad
.RS 10n
.rt
Channel mask to indicate the alpha channel.
.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_ImageZoomTranslateBlend\fR(3MLIB), \fBmlib_ImageZoomTranslateTableBlend\fR(3MLIB), \fBattributes\fR(5)