Re: CALL for DISCUSSION: eXIf 20170115

John Bowler <[email protected]>
Newsgroups gmane.comp.graphics.png.general
Message-ID <CAP7U399r_Fm7bO_=qmewBbt8U6jQDAdjcB98VT14+kKtZZ521w@mail.gmail.com>
On Tue, Jan 31, 2017 at 4:39 AM, Glenn Randers-Pehrson
<[email protected]> wrote:
> I don't understand why this is an argument against compression.

I think as a proponent of compression you have to argue *for* it with
a compelling argument.  I don't need to argue against it, and I don't
consider 0.12%, or 2%, best case file size reduction compelling.

> Consider the files at www.simplesystems.org/users/glennrp/eXIf/nikon_b700

Ok, some time today.  BTW my samples were genuinely chosen from a very
large set solely on the basis of pictures that I felt I could release
to the public domain.  I assume you meant the parent directory; there
is only one JPEG in the above directory.

> The Exif profile is 24945 bytes.  The JPEG is 385520 bytes, including
> the Exif profile.  The Exif profile in a ziXf chunk is... hey, the
> zxIf examples are missing, but it was about 10k.  So in this
> (typical for me) case, the savings is 15k/385k, or about 4%

Bad math; you used the size of the JPEG file, the PNG files you have
posted up there are 795569(exIf) and 780078(zxIf) bytes in size, which
is actually a 0.98% reduction.  I assume you used libpng, the
compression of the PNG is quite low.  jpegtopng produces PNG files
which are about 46kbytes smaller than the ones you made, and manages
to compress the zXIf slightly better as well.

The image you used is 1080x580 pixels, so the raw data was about
626,000 bytes.  This is quite low for a modern camera.  Indeed none of
my samples are this small; my smallest, produced by a relative old
mobile phone, was 1024x1795 pixels.  I cannot imagiine someone who is
going to convert a JPEG to PNG (presumably for editing) would use an
image that small.

Nevertheless if someone does you are still taking about reducing a PNG
size by 2%, when, in fact, if the libpng defaults were simply set to
high zlib compression level and Paeth filtering the size reduction
(using exIf) is 6%, and this scales with the image size.

BTW, this is a 0.5MPixel image.  The spec for that camera (from the
Nikon web site) is:

"20.2 MP low-light CMOS image sensor for brilliant photo and 4K UHD
video quality"

The MakerNote is 15kbytes; this is because the sensor is large (well,
by todays standards normal sized) and, apparently, the camera does not
reduce the MakerNote when it is used at very low resolution.

-- 
John Bowler <[email protected]>
+1 (541) 450-9885
PO BOX 3151
KERBY OR 97531-3151
USA

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.