Hi,

looks like it does not break something. Do you have a test-case for this?

Committed revision 2069.

        René

On Feb 27, 2015, at 11:03, Sven Eckelmann <[email protected]> wrote:

> ---
> lib/rotate.cc | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/rotate.cc b/lib/rotate.cc
> index 7516c74..1f317fe 100644
> --- a/lib/rotate.cc
> +++ b/lib/rotate.cc
> @@ -33,9 +33,9 @@ void flipX (Image& image)
>   if (!image.isModified() && image.getCodec())
>     if (image.getCodec()->flipX(image))
>       return;
> -  
> -  const unsigned stride = image.stride();
> +
>   uint8_t* data = image.getRawData();
> +  const int stride = image.stride();
>   switch (image.spp * image.bps)
>     {
>     case 1:
> @@ -106,9 +106,9 @@ void flipY (Image& image)
>   if (!image.isModified() && image.getCodec())
>     if (image.getCodec()->flipY(image))
>       return;
> -  
> -  const unsigned int bytes = image.stride();
> +
>   uint8_t* data = image.getRawData();
> +  const unsigned int bytes = image.stride();
>   for (int y = 0; y < image.h / 2; ++y)
>     {
>       int y2 = image.h - y - 1;
> @@ -131,10 +131,9 @@ void rot90 (Image& image, int angle)
>   bool cw = false; // clock-wise
>   if (angle == 90)
>     cw = true; // else 270 or -90 or whatever and thus counter cw
> -  
> -  int rot_stride = (image.h * image.spp * image.bps + 7) / 8;
> 
>   uint8_t* data = image.getRawData();
> +  int rot_stride = (image.h * image.spp * image.bps + 7) / 8;
>   uint8_t* rot_data = (uint8_t*) malloc(rot_stride * image.w);
> 
>   switch (image.spp * image.bps)
> -- 
> 2.1.4
> 

-- 
 ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
 DE Legal: Amtsgericht Berlin (Charlottenburg) HRB 105123B, Tax-ID#: DE251602478
 Managing Director: René Rebe
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
http://t2-project.org | http://rene.rebe.de

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe exact-image

Reply via email to