how do I reduce file size when using imagepng()?

the pngs I create with imagepng() are inordinately large (roughly 250K for a 400X400 image).

is there an easy way to reduce the file size while not affecting the image quality too much?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

check out this link

and look for comments of adrenalin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bitt3nAuthor Commented:
thanks star_trek

that decreases size about 7X which is great.. I am curious about one thing.. If I change the number of colors to convert from 255 to 255X255 (65 025), I would assume that the quality and size would go up, but the quality looks the same, and the size is only slightly larger. Why doesn't increasing the colors increase the size/quality? (although the only pictures in which I noticed any significant decrease in quality were cell phone pictures.. the others look almost the same)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.