Transparency Optimization in gd_gif_out.c

[email protected] ("David Reiss")
Newsgroups php.gd.devel
Message-ID <[email protected]>
I'm looking at gd-2.0.35, gd_gif_out.c, line 416.  It looks like this
loop (starting on line 407) is meant to loop over the entire temporary
image and, for each pixel that is the same color as the corresponding
pixel in the previous image, set the pixel to the transparent color.
I can't understand the break statement inside of the innermost
conditional.  It appears to abort the inner loop whenever it sets a
transparent pixel, preventing it from setting more than one pixel on
any given line.  I commented out this statement and got much better
results when creating animated GIF images.  I tried to use cvs
annotate to figure out why this line was added, but I wasn't able to
track it through a merge.  I was wondering if anyone could help me
track down what the function of this line is and if it is safe to
remove it from the gd trunk.

Thanks.

-- 
David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.