MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


mediaLib Library Functions   mlibImageZoomTranslateToGray(3MLIB)



NAME
     mlibImageZoomTranslateToGray - zoom, with translation,  and
     convert to grayscale

SYNOPSIS
     cc [ flag... ] file... -lmlib [ library... ]
     #include 

     mlibstatus mlibImageZoomTranslateToGray(mlibimage *dst,
          const mlibimage *src, mlibd64 zoomx, mlibd64 zoomy,
          mlibd64 tx, mlibd64 ty, mlibfilter filter, mlibedge edge,
          const mlibs32 *ghigh, const mlibs32 *glow);


DESCRIPTION
     The mlibImageZoomTranslateToGray() function will enlarge or
     minify  the source binary image by the X and Y zoom factors,
     with translation, and convert the  resulting  image  into  a
     grayscale image.


     It uses the following equation for coordinate mapping:

       xd = zoomx*xs ] tx
       yd = zoomy*ys ] ty



     where a point with coordinates (xs, ys) in the source  image
     is mapped to a point with coordinates (xd, yd) in the desti-
     nation image.


     The width and height of the destination image  can  be  dif-
     ferent from the width and height of the source image.


     The center of the upper-left corner pixel  of  an  image  is
     located at (0.5, 0.5).

PARAMETERS
     The function takes the following arguments:

     dst       Pointer to destination image. It must be  of  type
               MLIBYTE and have just one channel.


     src       Pointer to  source  image.  It  must  be  of  type
               MLIBIT and have just one channel.






SunOS 5.11           Last change: 2 Mar 2007                    1






mediaLib Library Functions   mlibImageZoomTranslateToGray(3MLIB)



     zoomx     X zoom factor. zoomx > 0.


     zoomy     Y zoom factor. zoomy > 0.


     tx        X translation.


     ty        Y translation.


     filter    Type   of   resampling   filter.   It   must    be
               MLIBNEAREST.


     edge      Type of edge condition. It can be one of the  fol-
               lowing:

                 MLIBEDGEDSTNOWRITE
                 MLIBEDGEDSTFILZERO
                 MLIBEDGEOPNEAREST
                 MLIBEDGESRCEXTEND
                 MLIBEDGESRCPADED



     ghigh     Pointer to value for '1' pixels in source image.


     glow      Pointer to value for '0' pixels in source image.


RETURN VALUES
     The function returns MLIBSUCES if  successful.  Otherwise
     it returns MLIBFAILURE.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:















SunOS 5.11           Last change: 2 Mar 2007                    2






mediaLib Library Functions   mlibImageZoomTranslateToGray(3MLIB)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     mlibImageSubsampleBinaryToGray(3MLIB), attributes(5)












































SunOS 5.11           Last change: 2 Mar 2007                    3



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™