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

Posted on 2006-04-20
Last Modified: 2008-03-17
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?
Question by:bitt3n
    LVL 11

    Accepted Solution

    check out this link

    and look for comments of adrenalin

    Author Comment

    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)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Part of the Global Positioning System A geocode ( is the major subset of a GPS coordinate (, the other parts being the altitude and t…
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now