diff -urN pngnq/pngnq-0.3/neuquant32.c pngnq/pngnq-0.31/neuquant32.c --- pngnq/pngnq-0.3/neuquant32.c 2004-09-14 00:00:00.000000000 +1000 +++ pngnq/pngnq-0.31/neuquant32.c 2006-06-17 09:19:54.000000000 +1000 @@ -382,7 +382,7 @@ alphadec = 30 + ((samplefac-1)/3); p = thepicture; lim = thepicture + lengthcount; - samplepixels = lengthcount/(3*samplefac); + samplepixels = lengthcount/(4*samplefac); /* Fixed sample factor bug 17/06/2006 Stuart Coyle */ delta = samplepixels/ncycles; /* here's a problem with small images: samplepixels < ncycles => delta = 0 */ if(delta==0) delta = 1; /* kludge to fix */ alpha = initalpha;