By default, the quality of JPG is now 95 instead of 75
[scilab.git] / scilab / modules / graphic_export / help / en_US / xs2jpg.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA - Sylvestre Koumar
5  * 
6  * This file must be used under the terms of the CeCILL.
7  * This source file is licensed as described in the file COPYING, which
8  * you should have received as part of this distribution.  The terms
9  * are also available at    
10  * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
11  *
12  -->
13 <refentry version="5.0-subset Scilab" xml:id="xs2jpg" xml:lang="en"
14           xmlns="http://docbook.org/ns/docbook"
15           xmlns:xlink="http://www.w3.org/1999/xlink"
16           xmlns:svg="http://www.w3.org/2000/svg"
17           xmlns:ns5="http://www.w3.org/1999/xhtml"
18           xmlns:mml="http://www.w3.org/1998/Math/MathML"
19           xmlns:db="http://docbook.org/ns/docbook">
20   <info>
21     <pubdate>$LastChangedDate$</pubdate>
22   </info>
23
24   <refnamediv>
25     <refname>xs2jpg</refname>
26
27     <refpurpose>Export graphics to JPG.</refpurpose>
28   </refnamediv>
29
30   <refsynopsisdiv>
31     <title>Calling Sequence</title>
32
33     <synopsis>xs2jpg(win_num, file_name [, compression_quality])
34 xs2jpg(fig, file_name [, compression_quality])</synopsis>
35   </refsynopsisdiv>
36
37   <refsection>
38     <title>Arguments</title>
39
40     <variablelist>
41       <varlistentry>
42         <term>win_num</term>
43
44         <listitem>
45           <para>integer, id of the figure to export.</para>
46         </listitem>
47       </varlistentry>
48           
49           <varlistentry>
50         <term>fig</term>
51
52         <listitem>
53           <para>handle of the figure to export.</para>
54         </listitem>
55       </varlistentry>
56
57       <varlistentry>
58         <term>file_name</term>
59
60         <listitem>
61           <para>string, name of the exported file.</para>
62         </listitem>
63       </varlistentry>
64
65       <varlistentry>
66         <term>compression_quality</term>
67
68         <listitem>
69           <para>real, a number between 0 and 1 (best quality). The default compression quality is set to 0.95.</para>
70           <para>Argument available since Scilab 5.3.2</para>
71         </listitem>
72       </varlistentry>
73     </variablelist>
74   </refsection>
75
76   <refsection>
77     <title>Description</title>
78
79     <para><literal>xs2jpg</literal> exports the display of a graphic window into a JPG file.</para>
80   </refsection>
81
82   <refsection>
83     <title>Examples</title>
84     <programlisting role="example"><![CDATA[ 
85 scf(0);
86 plot2d();
87 //JPG export
88 xs2jpg(0,'foo.jpg');
89 xs2jpg(gcf(),'foo.jpg');
90 xs2jpg(0,'foo_0.jpg', 0); // poor quality
91 xs2jpg(gcf(),'foo_1.jpg', 1); // best quality
92  ]]></programlisting>
93   </refsection>
94
95   <refsection role="see also">
96 <title>See Also</title>
97
98     <simplelist type="inline">
99       <member><link linkend="xs2bmp">xs2bmp</link></member>
100
101       <member><link linkend="xs2gif">xs2gif</link></member>
102
103       <member><link linkend="xs2png">xs2png</link></member>
104
105       <member><link linkend="xs2ppm">xs2ppm</link></member>
106
107       <member><link linkend="xs2eps">xs2eps</link></member>
108
109       <member><link linkend="xs2pdf">xs2pdf</link></member>
110
111       <member><link linkend="xs2svg">xs2svg</link></member>
112
113       <member><link linkend="xs2ps">xs2ps</link></member>
114
115       <member><link linkend="xs2fig">xs2fig</link></member>
116
117       <member><link linkend="xs2emf">xs2emf</link></member>
118     </simplelist>
119   </refsection>
120
121   <refsection>
122     <title>Authors</title>
123
124     <para>S.K</para>
125   </refsection>
126 </refentry>