1<html>
2
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css">
6<title>THPConvertJPEG2THP</title>
7</head>
8
9<body>
10
11<h1>THPConvertJPEG2THP</h1>
12
13<h2>C Specification</h2>
14
15<dl>
16<dd><pre><code>#include &lt;win32/thpcore.h&gt;</code></pre></dd>
17<dd><pre><code>s32 THPConvertJPEG2THP(void*            jpeg_ptr,
18    void*            thp_ptr,
19    s32              jpeg_length,
20    THPImageStatus*  status);</code></pre></dd>
21
22</dl>
23
24<h2>Arguments</h2>
25<table border="1" cellpadding="3" cellspacing="0.1">
26  <tr>
27<td width="120" bgcolor="#ffffe8"><strong><em><CODE>jpeg_ptr</CODE></em></strong></td>
28<td width="520">Pointer to the conversion source JPEG data.</td>
29  </tr>
30  <tr>
31<td width="120" bgcolor="#ffffe8"><strong><em><CODE>thp_ptr</CODE></em></strong></td>
32<td width="520">Output buffer for THP video data after conversion.</td>
33  </tr>
34  <tr>
35<td width="120" bgcolor="#ffffe8"><strong><em><CODE>jpeg_length</CODE></em></strong></td>
36<td width="520">Size of the conversion source JPEG data.</td>
37  </tr>
38  <tr>
39<td width="120" bgcolor="#ffffe8"><strong><em><CODE>status</CODE></em></strong></td>
40<td width="520">Pointer to the <CODE>THPImageStatus</CODE> structure that stores the THP image information.</td>
41  </tr>
42</table>
43
44<h2>Return Values</h2>
45<p>
46Returns one of the following codes:
47</p>
48
49<table border="1">
50  <tbody>
51    <tr align="center">
52<td>Code</td>
53<td width=50>Value</td>
54<td>Description</td>
55    </tr>
56    <tr>
57<td><CODE>THP_ERROR_NOERROR</CODE></td>
58      <td align="center">0</td>
59<td>The function ended normally.</td>
60    </tr>
61    <tr>
62<td><CODE>THP_ERROR_JPEGFILE</CODE></td>
63      <td align="center">3</td>
64<td>The JPEG data is invalid. </td>
65    </tr>
66  </tbody>
67</table>
68
69<h2>Description</h2>
70<p>
71This function converts <STRONG><EM><code>jpeg_length</code></EM> </STRONG> bytes of JPEG data specified by <STRONG><EM><code>jpeg_ptr</code></EM></STRONG> and outputs the converted JPEG data to the buffer specified by <STRONG><EM><code>thp_ptr</code></EM></STRONG>. Information about the converted data is saved in the <A href="THPImageStatus.html"><code>THPImageStatus</code> structure</A> specified by <STRONG><EM><code>status</code></EM></STRONG>.
72</p>
73
74<h2>See Also</h2>
75<p>
76<A href="THPImageStatus.html"><code>THPImageStatus</code></A>
77</p>
78
79<h2>Revision History</h2>
80<P>03/01/2006 Initial version.</P>
81</body>
82</html>