Welcome! Log In Create A New Profile

Advanced

Re: Резкость в модуле image filter

August 23, 2011 09:20AM
On Tue, Aug 23, 2011 at 03:05:09PM +0200, Anton Kuznetsov wrote:
> nginx 1.0.5
> Makefile поправил
>
> .if defined(WITH_HTTP_IMAGE_FILTER_MODULE)
> LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
> CONFIGURE_ARGS+=--with-http_image_filter_module
> EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ngx_http_image_filter_module.c
> .endif
>
> прилагаемый патч положил в files/extra-patch-ngx_http_image_filter_module.c
>
> Получается вот так:
>
> # make
> ===> Building for nginx-1.0.5,1
> make -f objs/Makefile
> cc -c -O -pipe -march=nocona -I /usr/local/include -I src/core -I
> src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I
> src/http/modules -o objs/src/http/modules/ngx_http_image_filter_module..o
> src/http/modules/ngx_http_image_filter_module.c
> src/http/modules/ngx_http_image_filter_module.c:130: error:
> 'ngx_http_image_filter_sharpen' undeclared here (not in a function)
> *** Error code 1

Новый патч.


--
Игорь Сысоев
http://sysoev.ru
Index: src/http/modules/ngx_http_image_filter_module.c
===================================================================
--- src/http/modules/ngx_http_image_filter_module.c (revision 4029)
+++ src/http/modules/ngx_http_image_filter_module.c (working copy)
@@ -41,6 +41,7 @@
ngx_uint_t height;
ngx_uint_t angle;
ngx_uint_t jpeg_quality;
+ ngx_uint_t sharpen;

ngx_flag_t transparency;

@@ -124,6 +125,13 @@
0,
NULL },

+ { ngx_string("image_filter_sharpen"),
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
+ ngx_conf_set_num_slot,
+ NGX_HTTP_LOC_CONF_OFFSET,
+ offsetof(ngx_http_image_filter_conf_t, sharpen),
+ NULL },
+
{ ngx_string("image_filter_transparency"),
NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
@@ -948,6 +956,10 @@
gdImageColorTransparent(dst, gdImageColorExact(dst, red, green, blue));
}

+ if (conf->sharpen) {
+ gdImageSharpen(dst, conf->sharpen);
+ }
+
out = ngx_http_image_out(r, ctx->type, dst, &size);

ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
@@ -1156,6 +1168,7 @@

conf->filter = NGX_CONF_UNSET_UINT;
conf->jpeg_quality = NGX_CONF_UNSET_UINT;
+ conf->sharpen = NGX_CONF_UNSET_UINT;
conf->angle = NGX_CONF_UNSET_UINT;
conf->transparency = NGX_CONF_UNSET;
conf->buffer_size = NGX_CONF_UNSET_SIZE;
@@ -1187,6 +1200,8 @@
/* 75 is libjpeg default quality */
ngx_conf_merge_uint_value(conf->jpeg_quality, prev->jpeg_quality, 75);

+ ngx_conf_merge_uint_value(conf->sharpen, prev->sharpen, 0);
+
if (conf->jqcv == NULL) {
conf->jqcv = prev->jqcv;
}
_______________________________________________
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
Subject Author Posted

Резкость в модуле image filter

Anton Kuznetsov August 23, 2011 07:10AM

Re: Резкость в модуле image filter

Igor Sysoev August 23, 2011 08:46AM

Re: Резкость в модуле image filter

Anton Kuznetsov August 23, 2011 09:06AM

Re: Резкость в модуле image filter

Igor Sysoev August 23, 2011 09:20AM

Re: Резкость в модуле image filter

Anton Kuznetsov August 23, 2011 12:04PM

Re: Резкость в модуле image filter

Igor Sysoev August 23, 2011 02:22PM

Re: Резкость в модуле image filter

Anton Kuznetsov August 23, 2011 07:10PM

Re: Резкость в модуле image filter

darmen October 27, 2011 05:32AM

Re: Резкость в модуле image filter

Oleksandr V. Typlyns'kyi October 27, 2011 06:52AM

Re: Резкость в модуле image filter

Anton Kuznetsov October 29, 2011 10:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 187
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready