View Single Post
  #74  
Old February 17th 20, 05:37 AM posted to alt.windows7.general,alt.comp.os.windows-10,microsoft.public.windowsxp.general
Paul[_32_]
external usenet poster
 
Posts: 11,873
Default Image formats

Mayayana wrote:
"Brian Gregory" wrote

| happens to be the default in
| whatever software you're using because I tried again with a different
| image editor and the TIFFs were then about 30% smaller than the PNGs.
|

I think you'll find a big range. It depends on how well the
image compresses. If it's a simpler image it will likely be much
smaller as a TIF. But a complex photo image may be smaller
as PNG.

I have a 5 MB photo that I tried converting to both formats.
PNG at 6 compression took about 8 seconds. At 9 it took about
30 seconds and oddly, wasn't any smaller. TIF was almost instant.
But in that case the PNG was smaller. (No, not an 8086. AMD
FX-8300, 8-core 3.6 GHz.) The conversions were all in IrfanView.


I tried this test too.

I was shocked to discover that PNG 0 was 70MB, PNG 1 (slight compression)
was 37MB, and PNG 9 (max compression) was 37MB. In other words, a picture
from a camera, there was only one level of lossless compression available
in a sense. It makes the compression level setting (almost) worthless.

The JPG it was made from was maybe 6-7MB or so. JPG can have quite high
compression, and the ratio of the sizes isn't that high of a compression
by JPG standards.

The secret weapon for JPG is the turbojpeg library. It uses
SSE, AVX, and/or multiple cores. And while there is IDCT
acceleration (inverse discrete cosine transform) available
from video cards, I don't know whether that fits into viewing
or not. When I tried JPG in Irfanview for example, it appeared
"instantly" on the screen.

Whereas for PNG, I doubt those sorts of acceleration are on offer.

One thing that was weird, was when I saved out a PNG with "zero"
compression, the output step was still slow.

And someone did think of parallelizing PNG compression. He views
it as the same problem as PIGZ (which is a parallelized GZIP compressor,
I think runs on two cores at least). Maybe the idea is to
break a PNG file down into multiple IDAT blocks, and do a
compression for each one on a different core. The blog entry
is from August 30, 2018.

https://brionv.com/log/2018/08/30/pa...-a-png-anyway/

It's amazing how slowly parallization passes into software lore.
Even PIGZ (a "prototype of parallelization") did not get picked up
in any substantial way. (I don't think Igor included that in 7ZIP
for example, only 7Z got accelerated.) If you want GZIP compression,
it's still largely a "single-core world".

Paul
Ads