changeset 4308:39982fa69482

Fixed "rotate" to always work when combined with "resize/crop".
author Ruslan Ermilov <ru@nginx.com>
date Wed, 23 Nov 2011 10:22:44 +0000
parents 9f418371831e
children 3f6040cd731e
files src/http/modules/ngx_http_image_filter_module.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_image_filter_module.c
+++ b/src/http/modules/ngx_http_image_filter_module.c
@@ -1262,7 +1262,11 @@ ngx_http_image_filter(ngx_conf_t *cf, ng
     } 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));