Mercurial > hg > nginx-site
annotate xml/cn/docs/http/ngx_http_image_filter_module.xml @ 2768:9dd8c203a54a
Updated docs for the upcoming NGINX Plus release.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Wed, 22 Sep 2021 13:47:23 +0300 |
parents | ceb8a4e374b7 |
children |
rev | line source |
---|---|
792
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Igor Sysoev |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 --> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="ngx_http_image_filter_module模块" |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/cn/docs/http/ngx_http_image_filter_module.html" |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 lang="cn" |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 translator="Cen Zheng" |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 rev="1"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <section id="summary"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 <literal>ngx_http_image_filter_module</literal> 模块(0.7.54+)是一个 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 过滤器,它可以对JPEG,GIF和PNG等图像进行变换。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 这个模块并不是默认编译的,需要通过 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <literal>--with-http_image_filter_module</literal>编译选项来启用。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <note> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 这个模块使用了 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <link url="http://libgd.org">libgd</link> 库。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 推荐使用这个库可用的最新版本;在写这个文档时它的最新版本是2.0.35。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 </note> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 </section> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <section id="example" name="配置例子"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 <example> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 location /img/ { |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 proxy_pass http://backend; |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 image_filter resize 150 100; |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 image_filter rotate 90; |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 error_page 415 = /empty; |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 } |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 location = /empty { |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 empty_gif; |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 } |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 </example> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 </section> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 <section id="directives" name="指令"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <directive name="image_filter"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 <syntax><literal>off</literal></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 <syntax><literal>test</literal></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 <syntax><literal>size</literal></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 <syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 <literal>rotate</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 <literal>90</literal> | <literal>180</literal> | |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 <literal>270</literal></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 <syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <literal>resize</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 <value>width</value> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 <value>height</value></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 <syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 <literal>crop</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 <value>width</value> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 <value>height</value></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 <default/> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 <context>location</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 设置图像变换的操作: |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <list type="tag"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 <tag-name><literal>off</literal></tag-name> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 在所在location关闭模块处理。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 </tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 <tag-name><literal>test</literal></tag-name> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 <tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 确保应答是JPEG,GIF或PNG格式的图像。否则错误 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 <http-status code="415" text="Unsupported Media Type"/> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 将被返回。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 </tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 <tag-name><literal>size</literal></tag-name> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 <tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 以JSON格式返回图像信息。例如: |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <example> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 { "img" : { "width": 100, "height": 100, "type": "gif" } } |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 </example> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 如果有错误发生,将会返回如下: |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 <example> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 {} |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 </example> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 </tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 <tag-name><literal>rotate</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 <literal>90</literal>|<literal>180</literal>|<literal>270</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 </tag-name> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 <tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 将图像逆时针旋转指定角度。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 参数的值可以包含变量。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 可以单独使用,或与 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 <literal>resize</literal> 和 <literal>crop</literal> 变换同时使用. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 </tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 <tag-name><literal>resize</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 <value>width</value> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 <value>height</value> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 </tag-name> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 <tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 按比例缩小图像至指定大小。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 如果想只指定其中一维,另一维可以指定为: |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 “<literal>-</literal>”。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 如果有错误发生,服务器会返回 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 <http-status code="415" text="Unsupported Media Type"/>. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 参数的值可以包含变量。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 当与 <literal>rotate</literal> 参数同时使用时, |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 旋转发生在缩放 <emphasis>之后</emphasis>。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 </tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 <tag-name><literal>crop</literal> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 <value>width</value> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 <value>height</value> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 </tag-name> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 <tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 按比例以图像的最短边为准对图像大小进行缩小,然后裁剪另一边多出来的部分。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 如果想只指定其中一维,另一维可以指定为: |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 “<literal>-</literal>”。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 如果有错误发生,服务器会返回 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 <http-status code="415" text="Unsupported Media Type"/>. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 参数的值可以包含变量。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 当与 <literal>rotate</literal> 参数同时使用时, |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 旋转发生在裁剪 <emphasis>之前</emphasis>。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 </tag-desc> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 </list> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 </directive> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 <directive name="image_filter_buffer"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 <syntax><value>size</value></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 <default>1M</default> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
154 <context>http</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 <context>server</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 <context>location</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 设置用来读图像的缓冲区的最大值。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 若图像超过这个大小,服务器会返回 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 <http-status code="415" text="Unsupported Media Type"/>. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
162 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
164 </directive> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 <directive name="image_filter_jpeg_quality"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 <syntax><value>quality</value></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 <default>75</default> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 <context>http</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
171 <context>server</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 <context>location</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 设置变换后的JPEG图像的 <value>质量</value> 。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 可配置值: 1 ~ 100 。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 更小的值意味着更差的图像质量以及更少需要传输的数据。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
178 推荐的最大值是95. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 参数的值可以包含变量。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 </directive> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 <directive name="image_filter_sharpen"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 <syntax><value>percent</value></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 <default>0</default> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 <context>http</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 <context>server</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 <context>location</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 增加最终图像的锐度。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 锐度百分比可以超过100. |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 0为关闭锐化。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 参数的值可以包含变量。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 </directive> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 <directive name="image_filter_transparency"> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 <syntax><literal>on</literal>|<literal>off</literal></syntax> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 <default>on</default> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 <context>http</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
206 <context>server</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 <context>location</context> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 <para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 定义当对PNG,或者GIF图像进行颜色变换时是否需要保留透明度。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 损失透明度有可能可以获得更高的图像质量。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 PNG图像中的alpha通道的透明度默认会一直被保留。 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 </para> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 </directive> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
216 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 </section> |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 |
ceb8a4e374b7
Updated the Chinese documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
219 </module> |