From 29301d9b038776dae7a58bf762b95af676f78cde Mon Sep 17 00:00:00 2001 From: David Maciejak Date: Wed, 21 May 2014 17:10:22 +0700 Subject: [PATCH] wrlib: RRotateImage function not fully implemented when the rotation angle value passed to RRotateImage is a modulo of 90, the function is working well but in other cases the rotateImage() function is called. That last function is half implemented but the half already implemented part is also segfaulting (use the testrot.c to replay the crash). So the patch is moving the 'not implemented' msg to disable the whole rotateImage() function and comment it out. --- wrlib/rotate.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wrlib/rotate.c b/wrlib/rotate.c index fead8ae7..09e8a0ad 100644 --- a/wrlib/rotate.c +++ b/wrlib/rotate.c @@ -213,6 +213,7 @@ RImage *RRotateImage(RImage * image, float angle) * */ +#if 0 static void copyLine(int x1, int y1, int x2, int y2, int nwidth, int format, unsigned char *dst, unsigned char **src) { @@ -292,9 +293,14 @@ copyLine(int x1, int y1, int x2, int y2, int nwidth, int format, unsigned char * *src = s; } +#endif static RImage *rotateImage(RImage * image, float angle) { + (void) angle; + puts("NOT FULLY IMPLEMENTED"); + return RCloneImage(image); +#if 0 RImage *img; int nwidth, nheight; int x1, y1; @@ -371,8 +377,6 @@ static RImage *rotateImage(RImage * image, float angle) } } } else { - puts("NOT IMPLEMTENED"); - return img; dpr = dx << 1; dpru = dpr - (dy << 1); p = dpr - dy; @@ -396,4 +400,5 @@ static RImage *rotateImage(RImage * image, float angle) } return img; +#endif } -- 2.11.4.GIT