6 Replies Latest reply on Jul 3, 2009 3:15 AM by katopz@sleepydesign.com

    PNG Compression

    kgrr
      Using the Flash IDE I can set a default jpeg compression for all my pngs (or a specific compression for each one). Does Anyone know how to do this with Flex? I've been searching with no success, but it must be built into the compiler.

      Thanks.
        • 1. Re: PNG Compression
          January_jsd Level 1
          quote:

          Originally posted by: kgrr
          Using the Flash IDE I can set a default jpeg compression for all my pngs (or a specific compression for each one). Does Anyone know how to do this with Flex? I've been searching with no success, but it must be built into the compiler.

          Thanks.


          I know this is an old post, but I'm having the same problem. I'm using the Flex3 SDK, and I'm looking for a way of telling the mxmlc compiler (at the command line) not to touch my embedded PNG resources, as they're already compressed.

          I started off with an SWF file of around 700k, then found a util that compressed PNGs. So, I compressed them, recompiled the SWF, but the output is still 700k even though the PNG compression util shaved off around 80k from the PNG resources. Admittedly, my resources are rather bloated (which I will fix later), but this behaviour of the compiler seems strange (no doubt I'm doing something wrong here ;) ).

          Any help would be appreciated :)

          • 2. Re: PNG Compression
            tonejac
            Still never found a solution to my problem. Presumable Adobe didn't consider this functionality.

            If your Png's are already compressed - what program did you compress them with?

            Here is my only guess with your issue: If you are embedding the png and then compressing it, it still contains the original png so you won't lose any filesize. I suppose that the Png Utility you found is made for compressing png's before exporting them from flash. Still seems strange. Personally, I've just been doing it the old way. If I have png's that I want to be able to easily adjust the compression of, I embed them in an fla file and then change the publish settings. Then I can bring the assets in that fla file into flex via a swf/swc.
            • 3. Re: PNG Compression
              axiomflash
              Kgrrr here. Above post is by me. Didn't realize someone else was logged in on my computer.
              • 4. Re: PNG Compression
                January_jsd Level 1
                Usually I just create the graphic in Photoshop, export as PNG (using Save, though you can use Save for Web which gives you various compression options with a PNG8), compress using PNGOut, and embed into the Flex code.

                However, I recently found NeuQuant ( WEBSITE) to compress my PNGs, and it does wonders with them - sometimes compressing over 50% with little/no visible effects. NeuQuant does have a little difficulty with large alpha spaces (some artifacts are introduced; not sure why). On the whole, a great tool and very quick.

                NeuQuant has helped the size issue, and I'm guessing by using RSLs I can further reduce the size - concentrating on getting the app written first, then I'll optimize ;)
                • 5. Re: PNG Compression
                  Level 7

                  "January_jsd" <webforumsuser@macromedia.com> wrote in message
                  news:g8ee1g$58m$1@forums.macromedia.com...
                  > Usually I just create the graphic in Photoshop, export as PNG (using Save,
                  > though you can use Save for Web which gives you various compression
                  > options
                  > with a PNG8), compress using PNGOut, and embed into the Flex code.
                  >
                  > However, I recently found NeuQuant
                  > ( http://members.ozemail.com.au/~dekker/NEUQUANT.HTML) to compress my PNGs,
                  > and
                  > it does wonders with them - sometimes compressing over 50% with little/no
                  > visible effects. NeuQuant does have a little difficulty with large alpha
                  > spaces (some artifacts are introduced; not sure why). On the whole, a
                  > great
                  > tool and very quick.
                  >
                  > NeuQuant has helped the size issue, and I'm guessing by using RSLs I can
                  > further reduce the size - concentrating on getting the app written first,
                  > then
                  > I'll optimize ;)

                  If you create them in Fireworks in the first place, they will be smaller
                  than Photoshop PNG's (when exported, not with the full FW proprietary info).


                  • 6. Re: PNG Compression
                    katopz@sleepydesign.com Level 1

                    it's 2009 now and still no way out ;o