1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>CAMERA_SetTrimmingParamsCenter</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">CAMERA_SetTrimmingParamsCenter <IMG src="../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <CODE>#include <twl/camera.h></CODE><BR> 16 <BR> 17 <CODE>void CAMERA_SetTrimmingParamsCenter(u16 destWidth, u16 destHeight, u16 srcWidth, u16 srcHeight);</CODE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" width="100%"> 21 <TBODY> 22 <TR> 23 <TD width="13%"><EM><STRONG>destWidth</STRONG></EM></TD> 24 <TD width="87%">Width after trimming (in pixels).</TD> 25 </TR> 26 <TR> 27 <TD width="13%"><EM><STRONG>destHeight</STRONG></EM></TD> 28 <TD width="87%">Height after trimming (in pixels).</TD> 29 </TR> 30 <TR> 31 <TD width="13%"><EM><STRONG>srcWidth</STRONG></EM></TD> 32 <TD width="87%">Camera resolution width (in pixels).</TD> 33 </TR> 34 <TR> 35 <TD width="13%"><EM><STRONG>srcHeight</STRONG></EM></TD> 36 <TD width="87%">Camera resolution height (in pixels).</TD> 37 </TR> 38 </TBODY> 39</TABLE> 40 41<H2>Return Values</H2> 42<P>None.</P> 43 44<H2>Description</H2> 45<P> 46Specifies the positions to use for trimming. Trimming includes the pixel with an x-coordinateof (<SPAN class="argument">srcHeight</SPAN>-<SPAN class="argument">destHeight</SPAN>)/2 and a y-coordinate of (<SPAN class="argument">srcWidth</SPAN>-<SPAN class="argument">destWidth</SPAN>)/2, but not the pixel with an x-coordinate of (<SPAN class="argument">srcHeight</SPAN>+<SPAN class="argument">destHeight</SPAN>)/2 and a y-coordinate of <SPAN class="argument">srcWidth</SPAN>+<SPAN class="argument">destWidth</SPAN>)/2. The camera resolution width and height specified as arguments should be the same as the size specified to the <code><A href="CAMERA_I2CSize.html">CAMERA_I2CSize*</A></code> functions. <BR><BR>To use this function, trimming must first be enabled by the <code><A href="CAMERA_SetTrimming.html">CAMERA_SetTrimming</A></code> function. <BR><BR>The width (<SPAN class="argument">destWidth</SPAN>) of the trimming range specified in this function must be an even number.<BR><BR>The following behavior will result if the trimming range is not specified properly with this function. 47<ul> 48<li>This function will do nothing and return when the trimming range exceeds the camera resolution size (<SPAN class="argument">destWidth</SPAN> > <SPAN class="argument">srcWidth</SPAN> or <SPAN class="argument">destHeight</SPAN> > <SPAN class="argument">srcHeight</SPAN>).</li> 49</ul> 50</P> 51</P> 52 53<H2>See Also</H2> 54<P><CODE><A href="CAMERA_SetTrimming.html">CAMERA_SetTrimming</A></CODE>, <CODE><A href="CAMERA_SetTrimmingParams.html">CAMERA_SetTrimmingParams</A></CODE>, <CODE><A href="CAMERA_I2CSize.html">CAMERA_I2CSize</A></CODE></P> 55<H2>Revision History</H2> 56<P>2008/04/03 Fixed typos in descriptions of the trimming range. <BR>2007/11/15 Added explanations for behavior when the trimming range is illegal. <BR>2007/10/23 Initial version.</P> 57<hr><p>CONFIDENTIAL</p></body> 58</HTML> 59