comparison xml/en/docs/http/ngx_http_image_filter_module.xml @ 966:95c3c3bbf1ce

Text review.
author Egor Nikitin <yegor.nikitin@gmail.com>
date Wed, 14 Aug 2013 12:03:41 +0400
parents 1e4f86ac3716
children 6ebdef43330a
comparison
equal deleted inserted replaced
965:fadccc156188 966:95c3c3bbf1ce
24 <literal>--with-http_image_filter_module</literal> 24 <literal>--with-http_image_filter_module</literal>
25 configuration parameter. 25 configuration parameter.
26 <note> 26 <note>
27 This module utilizes the 27 This module utilizes the
28 <link url="http://libgd.org">libgd</link> library. 28 <link url="http://libgd.org">libgd</link> library.
29 It is recommended to use the latest available version of the library; 29 It is recommended to use the latest available version of the library.
30 it is version 2.0.35 as of this writing.
31 </note> 30 </note>
32 </para> 31 </para>
33 32
34 </section> 33 </section>
35 34
85 </tag-desc> 84 </tag-desc>
86 85
87 <tag-name><literal>test</literal></tag-name> 86 <tag-name><literal>test</literal></tag-name>
88 <tag-desc> 87 <tag-desc>
89 ensures that responses are images in either JPEG, GIF, or PNG format. 88 ensures that responses are images in either JPEG, GIF, or PNG format.
90 Otherwise, the error 89 Otherwise, the
91 <http-status code="415" text="Unsupported Media Type"/> 90 <http-status code="415" text="Unsupported Media Type"/>
92 is returned. 91 error is returned.
93 </tag-desc> 92 </tag-desc>
94 93
95 <tag-name><literal>size</literal></tag-name> 94 <tag-name><literal>size</literal></tag-name>
96 <tag-desc> 95 <tag-desc>
97 outputs information about images in a JSON format, e.g.: 96 outputs information about images in a JSON format, e.g.:
98 <example> 97 <example>
99 { "img" : { "width": 100, "height": 100, "type": "gif" } } 98 { "img" : { "width": 100, "height": 100, "type": "gif" } }
100 </example> 99 </example>
101 In case of an error, the following is output: 100 In case of an error, the output is as follows:
102 <example> 101 <example>
103 {} 102 {}
104 </example> 103 </example>
105 </tag-desc> 104 </tag-desc>
106 105
107 <tag-name><literal>rotate</literal> 106 <tag-name><literal>rotate</literal>
108 <literal>90</literal>|<literal>180</literal>|<literal>270</literal> 107 <literal>90</literal>|<literal>180</literal>|<literal>270</literal>
109 </tag-name> 108 </tag-name>
110 <tag-desc> 109 <tag-desc>
111 rotates images counter-clockwise by the specified number of degrees. 110 rotates images counter-clockwise by the specified number of degrees.
112 Value of the parameter can contain variables. 111 Parameter value can contain variables.
113 Can be used either alone, or along with the 112 This mode can be used either alone or along with the
114 <literal>resize</literal> and <literal>crop</literal> transformations. 113 <literal>resize</literal> and <literal>crop</literal> transformations.
115 </tag-desc> 114 </tag-desc>
116 115
117 <tag-name><literal>resize</literal> 116 <tag-name><literal>resize</literal>
118 <value>width</value> 117 <value>width</value>
122 proportionally reduces an image to the specified sizes. 121 proportionally reduces an image to the specified sizes.
123 To reduce by only one dimension, another dimension can be specified as 122 To reduce by only one dimension, another dimension can be specified as
124 “<literal>-</literal>”. 123 “<literal>-</literal>”.
125 In case of an error, the server will return code 124 In case of an error, the server will return code
126 <http-status code="415" text="Unsupported Media Type"/>. 125 <http-status code="415" text="Unsupported Media Type"/>.
127 Values of parameters can contain variables. 126 Parameter values can contain variables.
128 When used along with the <literal>rotate</literal> parameter, 127 When used along with the <literal>rotate</literal> parameter,
129 the rotation happens <emphasis>after</emphasis> reduction. 128 the rotation happens <emphasis>after</emphasis> reduction.
130 </tag-desc> 129 </tag-desc>
131 130
132 <tag-name><literal>crop</literal> 131 <tag-name><literal>crop</literal>
133 <value>width</value> 132 <value>width</value>
134 <value>height</value> 133 <value>height</value>
135 </tag-name> 134 </tag-name>
136 <tag-desc> 135 <tag-desc>
137 proportionally reduces an image to the size of the largest side 136 proportionally reduces an image to the larger side size
138 and crops extraneous edges by another side. 137 and crops extraneous edges by another side.
139 To reduce by only one dimension, another dimension can be specified as 138 To reduce by only one dimension, another dimension can be specified as
140 “<literal>-</literal>”. 139 “<literal>-</literal>”.
141 In case of an error, the server will return code 140 In case of an error, the server will return code
142 <http-status code="415" text="Unsupported Media Type"/>. 141 <http-status code="415" text="Unsupported Media Type"/>.
143 Values of parameters can contain variables. 142 Parameter values can contain variables.
144 When used along with the <literal>rotate</literal> parameter, 143 When used along with the <literal>rotate</literal> parameter,
145 the rotation happens <emphasis>before</emphasis> reduction. 144 the rotation happens <emphasis>before</emphasis> reduction.
146 </tag-desc> 145 </tag-desc>
147 146
148 </list> 147 </list>
158 <context>server</context> 157 <context>server</context>
159 <context>location</context> 158 <context>location</context>
160 159
161 <para> 160 <para>
162 Sets the maximum size of the buffer used for reading images. 161 Sets the maximum size of the buffer used for reading images.
163 When a size is exceeded the server will return error 162 When the size is exceeded the server returns error
164 <http-status code="415" text="Unsupported Media Type"/>. 163 <http-status code="415" text="Unsupported Media Type"/>.
165 </para> 164 </para>
166 165
167 </directive> 166 </directive>
168 167
190 <context>server</context> 189 <context>server</context>
191 <context>location</context> 190 <context>location</context>
192 191
193 <para> 192 <para>
194 Sets the desired <value>quality</value> of the transformed JPEG images. 193 Sets the desired <value>quality</value> of the transformed JPEG images.
195 Acceptable values are in the 1..100 range. 194 Acceptable values are in the range from 1 to 100.
196 Lesser values usually imply both lower image quality and less data to transfer. 195 Lesser values usually imply both lower image quality and less data to transfer.
197 The maximum recommended value is 95. 196 The maximum recommended value is 95.
198 Value of the parameter can contain variables. 197 Parameter value can contain variables.
199 </para> 198 </para>
200 199
201 </directive> 200 </directive>
202 201
203 202
209 <context>location</context> 208 <context>location</context>
210 209
211 <para> 210 <para>
212 Increases sharpness of the final image. 211 Increases sharpness of the final image.
213 The sharpness percentage can exceed 100. 212 The sharpness percentage can exceed 100.
214 The value of 0 disables sharpening. 213 The zero value disables sharpening.
215 Value of the parameter can contain variables. 214 Parameter value can contain variables.
216 </para> 215 </para>
217 216
218 </directive> 217 </directive>
219 218
220 219
225 <context>server</context> 224 <context>server</context>
226 <context>location</context> 225 <context>location</context>
227 226
228 <para> 227 <para>
229 Defines whether transparency should be preserved when transforming 228 Defines whether transparency should be preserved when transforming
230 PNG images with colors specified by a palette, or in GIF images. 229 GIF images or PNG images with colors specified by a palette.
231 The loss of transparency allows to obtain images of a better quality. 230 The loss of transparency results in images of a better quality.
232 The alpha channel transparency in PNG is always preserved. 231 The alpha channel transparency in PNG is always preserved.
233 </para> 232 </para>
234 233
235 </directive> 234 </directive>
236 235