]> git.kaiwu.me - nginx.git/commitdiff
Fixed "rotate" to always work when combined with "resize/crop".
authorRuslan Ermilov <ru@nginx.com>
Wed, 23 Nov 2011 10:22:44 +0000 (10:22 +0000)
committerRuslan Ermilov <ru@nginx.com>
Wed, 23 Nov 2011 10:22:44 +0000 (10:22 +0000)
src/http/modules/ngx_http_image_filter_module.c

index f0c711e29e998a4e5edf0d970f6ee9ca652a3800..66ed34541e6a4bc02daac2f743d4c96e739d1b2a 100644 (file)
@@ -1262,7 +1262,11 @@ ngx_http_image_filter(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
     } 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));