[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[E-devel] Re: Imlib2 off by one pixel in TIFF loader



On Tue, 14 Mar 2006 21:13:47 +0100 Daniel Roethlisberger <daniel@roe.ch>
babbled:

> A commit dated 2005-11-30 broke TIFF loading.  All pixels are 1 off on
> the x axis, because data is extracted from pixel_value before
> pixel_value is read.

thanks! fixed in cvs.

> The trivial patch below applies cleanly against imlib2-1.2.1.010 and
> current CVS.
> 
> Cheers
> Dan
> 
> [1] http://sourceforge.net/mailarchive/message.php?msg_id=14035343
> 
> -- 
> Daniel Roethlisberger <daniel@roe.ch>
> GnuPG (PGP) key id 0x39740E98804A06B1
> 
> 
> --- src/modules/loaders/loader_tiff.c.orig	Fri Jan  6 16:36:17 2006
> +++ src/modules/loaders/loader_tiff.c	Tue Mar 14 20:39:26 2006
> @@ -100,11 +100,11 @@
>            {
>  	     int a, r, g, b;
>  	     
> +             pixel_value = (*(pixel++));
>  	     a = TIFFGetA(pixel_value);
>  	     r = TIFFGetR(pixel_value);
>  	     g = TIFFGetG(pixel_value);
>  	     b = TIFFGetB(pixel_value);
> -             pixel_value = (*(pixel++));
>  	     if ((a > 0) && (a < 255) && (alpha_premult))
>  	       {
>  		  r = (r * 255) / a;
> 
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)