Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_image_filter_module.xml @ 261:e93ece6bd34e
Fixed markup (added lot of links) and grammar.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 21 Dec 2011 09:25:24 +0000 |
parents | bfe3eff81d04 |
children | 945d7299c26c |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
205
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
4 |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
5 <module name="Модуль ngx_http_image_filter_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
6 link="/ru/docs/http/ngx_http_image_filter_module.html" |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 lang="ru"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
9 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
10 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 <para> |
203 | 12 Модуль <code>ngx_http_image_filter_module</code> — это фильтр для преобразования |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
13 изображений в форматах JPEG, GIF и PNG (0.7.54+). |
203 | 14 </para> |
15 | |
16 <para> | |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
17 По умолчанию этот модуль не собирается, его сборку необходимо |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
18 разрешить с помощью конфигурационного параметра |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
19 <code>--with-http_image_filter_module</code>. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
20 <note> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
21 Для сборки и работы этого модуля необходима библиотека |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 <link url="http://libgd.org">libgd</link>. |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
23 Рекомендуется использовать самую последнюю версию библиотеки, |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
24 на текущий момент это версия 2.0.35. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
25 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
27 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 <section name="Пример конфигурации" id="example"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 location /img/ { |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
36 proxy_pass http://backend; |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
37 image_filter resize 150 100; |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
38 image_filter rotate 90; |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
39 error_page 415 = /empty; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 location = /empty { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 empty_gif; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
44 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 <section name="Директивы" id="directives"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 <directive name="image_filter"> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
54 <syntax><parameter>off</parameter></syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
55 <syntax><parameter>test</parameter></syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
56 <syntax><parameter>size</parameter></syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
57 <syntax><parameter>rotate </parameter> |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
58 <value>90</value> | <value>180</value> | <value>270</value> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
59 </syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
60 <syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
61 <parameter>resize </parameter> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
62 <argument>ширина высота</argument> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
63 </syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
64 <syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
65 <parameter>crop </parameter> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
66 <argument>ширина высота</argument> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
67 </syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
68 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 <context>location</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 <para> |
203 | 72 Задаёт тип преобразования изображения: |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
73 <list type="tag"> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
74 |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
75 <tag-name><parameter>off</parameter></tag-name> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
76 <tag-desc> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
77 отключает обработку данным модулем во вложенном location. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
78 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
79 |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
80 <tag-name><parameter>test</parameter></tag-name> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
81 <tag-desc> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
82 проверяет, что ответ действительно является изображением |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
83 в формате JPEG, GIF или PNG. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
84 В противном случае возвращается ошибка |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
85 <http-status code="415" text="Unsupported Media Type"/>. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
86 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
88 <tag-name><parameter>size</parameter></tag-name> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
89 <tag-desc> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
90 выдаёт информацию об изображении в формате JSON, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
91 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
92 { "img" : { "width": 100, "height": 100, "type": "gif" } } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
94 В случае ошибки выдаётся |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
96 {} |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 </example> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
98 </tag-desc> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
99 |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
100 <tag-name><parameter>rotate </parameter> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
101 <value>90</value>|<value>180</value>|<value>270</value> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
102 </tag-name> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
103 <tag-desc> |
184
4840aa7bab2c
The "rotate" rotates counter-clockwise.
Ruslan Ermilov <ru@nginx.com>
parents:
183
diff
changeset
|
104 поворачивает изображение против часовой стрелки на указанное число градусов. |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
105 В значении аргумента допустимо использование переменных. |
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
106 Можно использовать как отдельно, так и совместно с преобразованиями |
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
107 <parameter>resize</parameter> и <parameter>crop</parameter>. |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
108 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
109 |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
110 <tag-name><parameter>resize </parameter> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
111 <argument>ширина высота</argument> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
112 </tag-name> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
113 <tag-desc> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
114 пропорционально уменьшает изображение до указанных размеров. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
115 Если требуется уменьшить только по одному измерению, то в качестве второго |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
116 можно указать “<code>-</code>”. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
117 В случае ошибки сервер возвращает код |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
118 <http-status code="415" text="Unsupported Media Type"/>. |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
119 В значениях аргументов допустимо использование переменных. |
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
120 При использовании совместно с <parameter>rotate</parameter>, |
203 | 121 поворот изображения происходит <emphasis>после</emphasis> |
122 уменьшения размеров изображения. | |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
123 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
125 <tag-name><parameter>crop </parameter> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
126 <argument>ширина высота</argument> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
127 </tag-name> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
128 <tag-desc> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
129 пропорционально уменьшает изображение до размера большей стороны |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 и обрезает лишние края по другой стороне. |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
131 Если требуется уменьшить только по одному измерению, то в качестве второго |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
132 можно указать “<code>-</code>”. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
133 В случае ошибки сервер возвращает код |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
134 <http-status code="415" text="Unsupported Media Type"/>. |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
135 В значениях аргументов допустимо использование переменных. |
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
136 При использовании совместно с <parameter>rotate</parameter>, |
203 | 137 поворот изображения происходит <emphasis>до</emphasis> |
138 уменьшения размеров изображения. | |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
139 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
140 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
141 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
143 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
144 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
145 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
146 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
147 <directive name="image_filter_buffer"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
148 <syntax><value>размер</value></syntax> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
149 <default>1M</default> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
150 <context>http</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
151 <context>server</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
152 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
153 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
154 <para> |
203 | 155 Задаёт максимальный размер буфера для чтения изображения. |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
156 При превышении размера сервер вернёт ошибку |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
157 <http-status code="415" text="Unsupported Media Type"/>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
158 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
159 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
160 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
161 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
162 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
163 <directive name="image_filter_jpeg_quality"> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
164 <syntax><value>1..100</value></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
165 <default>75</default> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
166 <context>http</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
167 <context>server</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
168 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
169 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
170 <para> |
203 | 171 Задаёт желаемое качество преобразованного изображения в формате JPEG. |
205 | 172 Меньшим значениям обычно соответствует худшее качество изображения |
173 и меньший объём передаваемых данных. | |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
174 Максимальное рекомендуемое значение — 95. |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
175 В значении аргумента допустимо использование переменных. |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
176 </para> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
177 |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
178 </directive> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
179 |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
180 |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
181 <directive name="image_filter_sharpen"> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
182 <syntax><argument>процент</argument></syntax> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
183 <default>0</default> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
184 <context>http</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
185 <context>server</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
186 <context>location</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
187 |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
188 <para> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
189 Повышает резкость итогового изображения. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
190 Процент резкости может быть больше 100. |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
191 Значение 0 отключает повышение резкости. |
191
a4e271eb8dd6
Documented that "rotate" can be combined with "resize/crop".
Ruslan Ermilov <ru@nginx.com>
parents:
184
diff
changeset
|
192 В значении аргумента допустимо использование переменных. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
193 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
194 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
195 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
196 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
197 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
198 <directive name="image_filter_transparency"> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
199 <syntax><value>on</value>|<value>off</value></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
200 <default>on</default> |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
201 <context>http</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
202 <context>server</context> |
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
203 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
204 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
205 <para> |
203 | 206 Определяет, сохранять ли прозрачность при обработке изображений |
183
aa4c2b46a4a3
Revised ngx_http_image_filter_module documentation, unfinished.
Igor Sysoev <igor@sysoev.ru>
parents:
110
diff
changeset
|
207 в формате PNG с цветами, заданными палитрой, и в формате GIF. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
208 Потеря прозрачности позволяет получить более качественное изображение. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
209 Прозрачность альфа-канала в формате PNG сохраняется всегда. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
210 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
211 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
212 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
213 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
214 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
215 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
216 </module> |