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_SetTrimmingParams</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">CAMERA_SetTrimmingParams <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_SetTrimmingParams(u16 x1, u16 y1, u16 x2, u16 y2);</CODE> 18</DL> 19<H2>Arguments</H2> 20<TABLE border="1" width="100%"> 21 <TBODY> 22 <TR> 23 <TD width="13%"><EM><STRONG>x1</STRONG></EM></TD> 24 <TD width="87%">Start position for trimming (in pixels)</TD> 25 </TR> 26 <TR> 27 <TD width="13%"><EM><STRONG>y1</STRONG></EM></TD> 28 <TD width="87%">Start position for trimming (in pixels)</TD> 29 </TR> 30 <TR> 31 <TD width="13%"><EM><STRONG>x2</STRONG></EM></TD> 32 <TD width="87%">End position for trimming (in pixels)</TD> 33 </TR> 34 <TR> 35 <TD width="13%"><EM><STRONG>y2</STRONG></EM></TD> 36 <TD width="87%">End position for trimming (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 (<SPAN class="argument">x1</SPAN>, <SPAN class="argument">y1</SPAN>) pixel. Trimming does not include the (<SPAN class="argument">x2</SPAN>, <SPAN class="argument">y2</SPAN>) pixel. <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 start position (<SPAN class="argument">y1</SPAN>) and end position (<SPAN class="argument">y2</SPAN>) in the image specified with this function must be an even number.<BR> <BR><BR>The following behavior will result if the trimming range is not specified properly with this function. 47<ul> 48<li>When the trimming start position is larger than the end position (<SPAN class="argument">x1</SPAN> > <SPAN class="argument">x2</SPAN> or <SPAN class="argument">y1</SPAN> > <SPAN class="argument">y2</SPAN>), this function will do nothing and return.</li> 49<li>When the trimming end position is outside of the range of the camera's resolution, data is saved with the end of the original image used for the trimming range. For example, if the camera resolution is <CODE>CAMERA_SIZE_QVGA</CODE> (320, 240), specifying (160, 120) for (<SPAN class="argument">x1</SPAN>, <SPAN class="argument">y1</SPAN>) and (400, 200) for (<SPAN class="argument">x2</SPAN>, <SPAN class="argument">y2</SPAN>) results in a range from (160, 120) to (320, 200). In the same way, specifying (160, 120) for (<SPAN class="argument">x1</SPAN>, <SPAN class="argument">y1</SPAN>) and (240, 360) for (<SPAN class="argument">x2</SPAN>, <SPAN class="argument">y2</SPAN>) will result in a trimming range from (160, 120) to (240, 240).</li> 50<li>When the start position for trimming is not in the range of the camera resolution, data will not be saved.</li> 51</ul> 52</P> 53 54<H2>See Also</H2> 55<P><CODE><A href="CAMERA_SetTrimming.html">CAMERA_SetTrimming</A></CODE>, <CODE><A href="CAMERA_SetTrimmingParamsCenter.html">CAMERA_SetTrimmingParamsCenter</A></CODE></P> 56<H2>Revision History</H2> 57<P>2007/11/15 Added an explanation of behavior for illegal trimming ranges. <BR>2007/10/23 Added descriptions. <BR>2007/10/02 Initial version.</P> 58<hr><p>CONFIDENTIAL</p></body> 59</HTML> 60