From ea38fe54bde053c4d60e9be7b1fcb08ea95e7e95 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 7 Apr 2011 09:12:30 +0000 Subject: [PATCH] fix "image_filter rotate 180" and crop case the bug has been introduced in r3879 --- src/http/modules/ngx_http_image_filter_module.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c index de1634a86..ecbfd158b 100644 --- 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) {