[poppler] [PATCH] Correctly manipulate spot colors if SPOT_NCOMPS != 4

Albert Astals Cid aacid at kde.org
Sat May 26 08:55:49 UTC 2018


I don't really understand the patch, are you saying something like "the code 
is correct, if you change it wrong it will break"? That happens in lots of 
places ;)

But since this happens inside SPLASH_CMYK, and that's mostly Thomas baby, so 
asking for his input (or anyone elses), at this point my vote is -0.25

Cheers,
  Albert

El dissabte, 26 de maig de 2018, a les 2:47:13 CEST, Stefan BrĂ¼ns va escriure:
> The default number of spot colors is 4, in this case the change is
> without effect, otherwise only the last 4 colors where handled.
> ---
>  splash/SplashTypes.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/splash/SplashTypes.h b/splash/SplashTypes.h
> index ca0e3bc0..2f65b5ba 100644
> --- a/splash/SplashTypes.h
> +++ b/splash/SplashTypes.h
> @@ -126,7 +126,7 @@ static inline void splashClearColor(SplashColorPtr dest)
> { dest[2] = 0;
>  #ifdef SPLASH_CMYK
>    dest[3] = 0;
> -  for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
> +  for (int i = 4; i < SPOT_NCOMPS + 4; i++)
>      dest[i] = 0;
>  #endif
>  }
> @@ -137,7 +137,7 @@ static inline void splashColorCopy(SplashColorPtr dest,
> SplashColorPtr src) { dest[2] = src[2];
>  #ifdef SPLASH_CMYK
>    dest[3] = src[3];
> -  for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
> +  for (int i = 4; i < SPOT_NCOMPS + 4; i++)
>      dest[i] = src[i];
>  #endif
>  }
> @@ -148,7 +148,7 @@ static inline void splashColorXor(SplashColorPtr dest,
> SplashColorPtr src) { dest[2] ^= src[2];
>  #ifdef SPLASH_CMYK
>    dest[3] ^= src[3];
> -  for (int i = SPOT_NCOMPS; i < SPOT_NCOMPS + 4; i++)
> +  for (int i = 4; i < SPOT_NCOMPS + 4; i++)
>      dest[i] ^= src[i];
>  #endif
>  }






More information about the poppler mailing list