Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_image_filter_module.xml @ 829:eb4f221921fa
Donor added.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Mon, 04 Feb 2013 08:31:37 +0000 |
parents | 5da520cae945 |
children | 1e4f86ac3716 |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
205
diff
changeset
|
1 <?xml version="1.0"?> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
7 |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="Module ngx_http_image_filter_module" |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/http/ngx_http_image_filter_module.html" |
589 | 12 lang="en" |
710
5da520cae945
Bumped document revision forgotten in r684.
Ruslan Ermilov <ru@nginx.com>
parents:
683
diff
changeset
|
13 rev="2"> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
347
daae2b619815
Specify the module history information in a unified place.
Ruslan Ermilov <ru@nginx.com>
parents:
294
diff
changeset
|
18 The <literal>ngx_http_image_filter_module</literal> module (0.7.54+) is a filter |
daae2b619815
Specify the module history information in a unified place.
Ruslan Ermilov <ru@nginx.com>
parents:
294
diff
changeset
|
19 that transforms images in JPEG, GIF, and PNG formats. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 <para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 This module is not built by default, it should be enabled with the |
271 | 24 <literal>--with-http_image_filter_module</literal> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 configuration parameter. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <note> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 This module utilizes the |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <link url="http://libgd.org">libgd</link> library. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 It is recommended to use the latest available version of the library; |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 it is version 2.0.35 as of this writing. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </note> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 </section> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 <section id="example" name="Example Configuration"> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 <para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <example> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 location /img/ { |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 proxy_pass http://backend; |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 image_filter resize 150 100; |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 image_filter rotate 90; |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 error_page 415 = /empty; |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 } |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 location = /empty { |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 empty_gif; |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 } |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 </example> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 </section> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 <section id="directives" name="Directives"> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 <directive name="image_filter"> |
364 | 60 <syntax><literal>off</literal></syntax> |
61 <syntax><literal>test</literal></syntax> | |
62 <syntax><literal>size</literal></syntax> | |
63 <syntax> | |
64 <literal>rotate</literal> | |
65 <literal>90</literal> | <literal>180</literal> | | |
66 <literal>270</literal></syntax> | |
67 <syntax> | |
68 <literal>resize</literal> | |
69 <value>width</value> | |
70 <value>height</value></syntax> | |
71 <syntax> | |
72 <literal>crop</literal> | |
73 <value>width</value> | |
74 <value>height</value></syntax> | |
683
6c14c73d74ee
Documented default value of the image_filter directive.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
75 <default>off</default> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 <context>location</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 <para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 Sets the type of transformation to perform on images: |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <list type="tag"> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 |
271 | 82 <tag-name><literal>off</literal></tag-name> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 turns off module processing in a surrounding location. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 </tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 |
271 | 87 <tag-name><literal>test</literal></tag-name> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 <tag-desc> |
294 | 89 ensures that responses are images in either JPEG, GIF, or PNG format. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 Otherwise, the error |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 <http-status code="415" text="Unsupported Media Type"/> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 is returned. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 </tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 |
271 | 95 <tag-name><literal>size</literal></tag-name> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 outputs information about images in a JSON format, e.g.: |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 <example> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 { "img" : { "width": 100, "height": 100, "type": "gif" } } |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 </example> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 In case of an error, the following is output: |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 <example> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 {} |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 </example> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 </tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 |
271 | 107 <tag-name><literal>rotate</literal> |
108 <literal>90</literal>|<literal>180</literal>|<literal>270</literal> | |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 </tag-name> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 <tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 rotates images counter-clockwise by the specified number of degrees. |
271 | 112 Value of the parameter can contain variables. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 Can be used either alone, or along with the |
271 | 114 <literal>resize</literal> and <literal>crop</literal> transformations. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 </tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 |
271 | 117 <tag-name><literal>resize</literal> |
118 <value>width</value> | |
119 <value>height</value> | |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 </tag-name> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 <tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 proportionally reduces an image to the specified sizes. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 To reduce by only one dimension, another dimension can be specified as |
271 | 124 “<literal>-</literal>”. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 In case of an error, the server will return code |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 <http-status code="415" text="Unsupported Media Type"/>. |
271 | 127 Values of parameters can contain variables. |
128 When used along with the <literal>rotate</literal> parameter, | |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 the rotation happens <emphasis>after</emphasis> reduction. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 </tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 |
271 | 132 <tag-name><literal>crop</literal> |
133 <value>width</value> | |
134 <value>height</value> | |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 </tag-name> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 <tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 proportionally reduces an image to the size of the largest side |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 and crops extraneous edges by another side. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 To reduce by only one dimension, another dimension can be specified as |
271 | 140 “<literal>-</literal>”. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 In case of an error, the server will return code |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 <http-status code="415" text="Unsupported Media Type"/>. |
271 | 143 Values of parameters can contain variables. |
144 When used along with the <literal>rotate</literal> parameter, | |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 the rotation happens <emphasis>before</emphasis> reduction. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 </tag-desc> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 </list> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 </directive> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
154 <directive name="image_filter_buffer"> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 <syntax><value>size</value></syntax> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 <default>1M</default> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 <context>http</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 <context>server</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 <context>location</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 <para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
162 Sets the maximum size of the buffer used for reading images. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 When a size is exceeded the server will return error |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
164 <http-status code="415" text="Unsupported Media Type"/>. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 </directive> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 <directive name="image_filter_jpeg_quality"> |
271 | 171 <syntax><value>quality</value></syntax> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 <default>75</default> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 <context>http</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 <context>server</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 <context>location</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 <para> |
271 | 178 Sets the desired <value>quality</value> of the transformed JPEG images. |
179 Acceptable values are in the 1..100 range. | |
205 | 180 Lesser values usually imply both lower image quality and less data to transfer. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 The maximum recommended value is 95. |
271 | 182 Value of the parameter can contain variables. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 </directive> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 <directive name="image_filter_sharpen"> |
271 | 189 <syntax><value>percent</value></syntax> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 <default>0</default> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 <context>http</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 <context>server</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 <context>location</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 <para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 Increases sharpness of the final image. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 The sharpness percentage can exceed 100. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 The value of 0 disables sharpening. |
271 | 199 Value of the parameter can contain variables. |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 </directive> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 <directive name="image_filter_transparency"> |
271 | 206 <syntax><literal>on</literal>|<literal>off</literal></syntax> |
204
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 <default>on</default> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 <context>http</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 <context>server</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 <context>location</context> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 <para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 Defines whether transparency should be preserved when transforming |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 PNG images with colors specified by a palette, or in GIF images. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 The loss of transparency allows to obtain images of a better quality. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
216 The alpha channel transparency in PNG is always preserved. |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 </para> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
219 </directive> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
221 </section> |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
222 |
eed54ef19197
English translation of the ngx_http_image_filter_module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
223 </module> |