# HG changeset patch # User Igor Sysoev # Date 1302167550 0 # Node ID ea712f4dc030158a8149c184394da6b6c9657b46 # Parent 3a7d32071a1aec1447aef992fe68f6b77a9c2fda fix "image_filter rotate 180" and crop case the bug has been introduced in r3879 diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c --- 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) {