[nginx] svn commit: r4309 - trunk/src/http/modules

ru at nginx.com ru at nginx.com
Wed Nov 23 10:22:44 UTC 2011


Author: ru
Date: 2011-11-23 10:22:44 +0000 (Wed, 23 Nov 2011)
New Revision: 4309

Log:
Fixed "rotate" to always work when combined with "resize/crop".


Modified:
   trunk/src/http/modules/ngx_http_image_filter_module.c

Modified: trunk/src/http/modules/ngx_http_image_filter_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_image_filter_module.c	2011-11-23 10:16:30 UTC (rev 4308)
+++ trunk/src/http/modules/ngx_http_image_filter_module.c	2011-11-23 10:22:44 UTC (rev 4309)
@@ -1262,7 +1262,11 @@
     } else if (cf->args->nelts == 3) {
 
         if (ngx_strcmp(value[i].data, "rotate") == 0) {
-            imcf->filter = NGX_HTTP_IMAGE_ROTATE;
+            if (imcf->filter != NGX_HTTP_IMAGE_RESIZE
+                && imcf->filter != NGX_HTTP_IMAGE_CROP)
+            {
+                imcf->filter = NGX_HTTP_IMAGE_ROTATE;
+            }
 
             ngx_memzero(&ccv, sizeof(ngx_http_compile_complex_value_t));
 



More information about the nginx-devel mailing list