in reply to GD thumbnail script errors

Not completely sure, but the code at the link you mentioned has at least two typos. unless the same method is flipping a dice to decide whether it prints a jpeg or a png.. and chicken has only one c. So I wouldn't trust it to be correct.

I've had good results with gimp and perl-fu which I found does high-quality resizing.

You might like to see if you can properly load the jpeg and save it to a new file without resizing it first. Conceivably GD can't read someone's implementation.