diff src/http/modules/ngx_http_image_filter_module.c @ 620:b4dcae568a2a NGINX_1_0_0

nginx 1.0.0 *) Bugfix: a cache manager might hog CPU after reload. Thanks to Maxim Dounin. *) Bugfix: an "image_filter crop" directive worked incorrectly coupled with an "image_filter rotate 180" directive. *) Bugfix: a "satisfy any" directive disabled custom 401 error page.
author Igor Sysoev <http://sysoev.ru>
date Tue, 12 Apr 2011 00:00:00 +0400
parents b9763778e212
children d4da38525468
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
@@ -863,6 +863,10 @@ transparent:
             }
             gdImageCopyRotated(dst, src, dy/2, dx/2, 0, 0, dx, dy, ctx->angle);
             gdImageDestroy(src);
+
+            t = dx;
+            dx = dy;
+            dy = t;
             break;
 
         case 180:
@@ -875,10 +879,6 @@ transparent:
             gdImageDestroy(src);
             break;
         }
-
-        t = dx;
-        dx = dy;
-        dy = t;
     }
 
     if (conf->filter == NGX_HTTP_IMAGE_CROP) {