mlib_ImageComposite_Inp man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

mlib_ImageComposite_Inp(3MmediaLib Library Functmlib_ImageComposite_Inp(3MLIB)

NAME
       mlib_ImageComposite_Inp - image composition, in place

SYNOPSIS
       cc [ flag... ] file... -lmlib [ library... ]
       #include <mlib.h>

       mlib_status mlib_ImageComposite_Inp(mlib_image *src1dst,
	   const mlib_image *src2, mlib_blend bsrc1, mlib_blend bsrc2,
	   mlib_s32 cmask);

DESCRIPTION
       The  mlib_ImageComposite_Inp() function supports digital image composi‐
       tion.

       It is a wrapper of the mlib_ImageBlend_BSCR1_BSRC2_Inp group  of	 func‐
       tions and can perform various types of composition based on the parame‐
       ters  passed   in,   whereas   each   function	in   the   mlib_Image‐
       Blend_BSCR1_BSRC2_Inp  group  can perform only the one kind of composi‐
       tion denoted by its name.

       The image type must be MLIB_BYTE. The input and output images must con‐
       tain  three or four channels. For three-channel images, the alpha value
       is as if the alpha value is 1.

       The following are predefined blend factor types used in mediaLib	 image
       composition functions.

	 /* image blend factors */
	 typedef enum {
	    MLIB_BLEND_ZERO,
	    MLIB_BLEND_ONE,
	    MLIB_BLEND_DST_COLOR,
	    MLIB_BLEND_SRC_COLOR,
	    MLIB_BLEND_ONE_MINUS_DST_COLOR,
	    MLIB_BLEND_ONE_MINUS_SRC_COLOR,
	    MLIB_BLEND_DST_ALPHA,
	    MLIB_BLEND_SRC_ALPHA,
	    MLIB_BLEND_ONE_MINUS_DST_ALPHA,
	    MLIB_BLEND_ONE_MINUS_SRC_ALPHA,
	    MLIB_BLEND_SRC_ALPHA_SATURATE
	 } mlib_blend;

       See the following table for the definitions of the blend factors.

		    Type		   Blend Factor [*]	   Abbr.
       ───────────────────────────────────────────────────────────────────
       MLIB_BLEND_ZERO			(0,0,0,0)		  ZERO
       MLIB_BLEND_ONE			(1,1,1,1)		  ONE
       MLIB_BLEND_DST_COLOR		(Rd,Gd,Bd,Ad)		  DC
       MLIB_BLEND_SRC_COLOR		(Rs,Gs,Bs,As)		  SC
       MLIB_BLEND_ONE_MINUS_DST_COLOR	(1,1,1,1)-(Rd,Gd,Bd,Ad)	  OMDC

       MLIB_BLEND_ONE_MINUS_SRC_COLOR	(1,1,1,1)-(Rs,Gs,Bs,As)	  OMSC
       MLIB_BLEND_DST_ALPHA		(Ad,Ad,Ad,Ad)		  DA
       MLIB_BLEND_SRC_ALPHA		(As,As,As,As)		  SA
       MLIB_BLEND_ONE_MINUS_DST_ALPHA	(1,1,1,1)-(Ad,Ad,Ad,Ad)	  OMDA
       MLIB_BLEND_ONE_MINUS_SRC_ALPHA	(1,1,1,1)-(As,As,As,As)	  OMSA
       MLIB_BLEND_SRC_ALPHA_SATURATE	(f,f,f,1)		  SAS

       [*]:  The components of the first source image pixel are (Rd,Gd,Bd,Ad),
       and the components of the second source pixel are (Rs,Gs,Bs,As).	 Func‐
       tion  f = min(As, 1-Ad). The first source image is also the destination
       image.

       The blending formula for in-place processing is:

	 Cd = Cd*D + Cs*S

       where Cd is the destination pixel (Rd,Gd,Bd,Ad), Cs is the source pixel
       (Rs,Gs,Bs,As),  and  D  and S are the blend factors for the destination
       and source, respectively.

PARAMETERS
       The function takes the following arguments:

       src1dst	  Pointer to the first source and the destination image.

       src2	  Pointer to the second source image.

       bsrc1	  Blend factor type for the first source image.

       bsrc2	  Blend factor type for the second source image.

       cmask	  Channel mask to indicate the alpha channel. Each bit of  the
		  mask	represents  a channel in the image. The channel corre‐
		  sponding to the 1 bit is the alpha channel.  cmask  must  be
		  either 0x01 or 0x08.

RETURN VALUES
       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
       MLIB_FAILURE.

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface Stability	     │Committed			   │
       ├─────────────────────────────┼─────────────────────────────┤
       │MT-Level		     │MT-Safe			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       mlib_ImageBlend_BSRC1_BSRC2(3MLIB),			   mlib_Image‐
       Blend_BSRC1_BSRC2_Inp(3MLIB), mlib_ImageComposite(3MLIB), attributes(5)

SunOS 5.10			  2 Mar 2007	mlib_ImageComposite_Inp(3MLIB)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net