THESE FORUMS NOW CLOSED (read only)

  • 28 Mar 2024, 06:36
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Compressing PNGs  (Read 12467 times)

Neskah

  • Balloon animal serial killer
  • *
  • Offline Offline
  • Posts: 97
Compressing PNGs
« on: 02 Nov 2005, 12:47 »

After reading the advice tips around qc I changed a few of my images files to PNG. The difference is amazing. The image is infinately cleaner, clearer and just pretty.

the issue has arisen however, that PNG are much larger file sizes then jpgs. much much much larger.

I don't want to give up my PNGs, i've grown found of the quality, but is there a way i can compress the files on my website? QC doesn't eat my bandwidth when i visit, i don't want my site to be one that does.


Any advice?
Logged
One of the most basic rules for survival is never upset someone wearing Black Leather - This is why PETA never throws paint on Hells Angels.

Sideways

  • Guest
Compressing PNGs
« Reply #1 on: 02 Nov 2005, 12:55 »

Use PKZIP.

PNG uses the Deflate compression method, used in the popular pkzip file archiving utility. Deflate is an improved version of the Lempel-Ziv compression algorithm [LZ77]. It works similarly to the LZW algorithm, and looks for repeated horizontal patterns along each scan line. To further enhance compression, PNG prefilters the image data using predictor functions before it's compressed. PNG uses four predictor functions, two of which address vertical patterns.

So PNG behaves like GIF in that it compresses horizontal patterns, but PNG's filters also find vertical patterns, resulting in additional compression.
Logged

decklin

  • Guest
Compressing PNGs
« Reply #2 on: 02 Nov 2005, 13:45 »

Erm, how does pkzip help? you can't compress something that's already compressed.

To optimize PNG's compression as much as humanly (or... computerly, i guess) possible, use pngcrush.

If you are talking about photographic images, however, PNG is *always* going to be larger. PNG is a lossless compression algorithm and JPEG is a lossy one.
Logged

Valrus

  • I'm Randy! I'm eternal!
  • ****
  • Offline Offline
  • Posts: 654
  • moo hoo ha ha
Compressing PNGs
« Reply #3 on: 02 Nov 2005, 15:59 »

Yeah, PNG is better for images with big homogeneous blocks like those in, say, Penny Arcade comic strips or decklin's current avatar. Pictures with more subtle gradations or lots of color changes like, as decklin said, most photographs, will be much better served by JPG.
Logged
Quote from: Johnny C
Whatever you give up for Lent, it better not be your day job.

decklin

  • Guest
Compressing PNGs
« Reply #4 on: 02 Nov 2005, 17:45 »

PNG also has an alpha channel, which is how I have my avatar blend into the background of the page. :)

I only use a 1-bit alpha (transparent or opaque), but PNG offers the possibility of a full 8-bit alpha channel for varying levels of translucency. Not all web browsers support such PNGs though.
Logged

jeph

  • Administrator
  • Duck attack survivor
  • ******
  • Offline Offline
  • Posts: 1,848
  • MON DIEU!
    • Questionable Content
Compressing PNGs
« Reply #5 on: 02 Nov 2005, 20:08 »

If you're using PNG-8 there is NO WAY your files should be bigger than jpegs. PNG-24 is fancier but very large (and honestly not THAT useful).

Typically QC strips are published as either 128 or 256-color PNG-8s.

Also: Wide, horizontal images compress markedly better than tall, vertical ones. Sucks for me I guess!
Logged
Deathmole Jacques' head takes up the bottom half of the panel, with his words taking up the top half. He is not concerned about the life of his friend.

Lunchbox

  • Lovecraftian nightmare
  • *****
  • Offline Offline
  • Posts: 2,784
  • Resident Beard Advisor
    • Tiger Darling
Compressing PNGs
« Reply #6 on: 03 Nov 2005, 03:13 »

When I use Photoshop CS  and try to compress with PNG, the pictures turn out really dark. Like my characters are trying to converse and drink beer in the middle of a blackout.
What is doing this?
Logged

McTaggart

  • William Gibson's Babydaddy
  • *****
  • Offline Offline
  • Posts: 2,416
  • Positive feedback.
Compressing PNGs
« Reply #7 on: 03 Nov 2005, 05:56 »

I work with photos, so compression pretty much doesn't happen for me. I keep at least three copies of most of my pictures. One RAW, one 8-bit TIFF, and one dodgy .jpg. If I'm backing stuff up sometimes I only keep the raw, because raws are nice and small, 9 or so mb as opposed to the 16 to 20 mb tiffs they become when I process them. For posting on the internet I use jpeg. A jpeg at quality 10 or so doesn't look bad at all and is on hell of a lot smaller the a png of the same image. For photographs that is anyway.
Logged
One day ends and another begins and we're never none the wiser.

jeph

  • Administrator
  • Duck attack survivor
  • ******
  • Offline Offline
  • Posts: 1,848
  • MON DIEU!
    • Questionable Content
Compressing PNGs
« Reply #8 on: 03 Nov 2005, 15:38 »

Quote from: Lunchbox
When I use Photoshop CS  and try to compress with PNG, the pictures turn out really dark. Like my characters are trying to converse and drink beer in the middle of a blackout.
What is doing this?


That's a weird issue, I've certainly never run into that. I WOULD recommend using ImageReady or Illustrator's Save for Web feature to do your compressing though, as Photoshop's seems a lot more prone to crashing or taking ass-long to render.
Logged
Deathmole Jacques' head takes up the bottom half of the panel, with his words taking up the top half. He is not concerned about the life of his friend.

Lunchbox

  • Lovecraftian nightmare
  • *****
  • Offline Offline
  • Posts: 2,784
  • Resident Beard Advisor
    • Tiger Darling
Compressing PNGs
« Reply #9 on: 03 Nov 2005, 17:19 »

Thanks, I'll have to dig up my copy of ImageReady and give it a whirl.
Logged
Pages: [1]   Go Up