If my camera captures an image and saves it in tiff format. NO INFORMATION IS LOST.
But that's the step at which information is lost, but you're part of the process.

For you to have a PNG of a certain file size, you are picking an upper-bounded width and height to take your picture.

JPEG allows you to make that tradeoff later in the cycle by trading some of the individual bit accuracy for the overall pixel count.

There is always a loss in the process. You do not record every nuance of the original analog experience. You are reducing it to some discrete value in various stages along the process, during the capture by deciding bits-per-pixel and total pixels, and during file storage by deciding whether you are willing to trade either or both of bits-per-pixel or accuracy of individual pixels to retain overall image quality. PNG and JPEG just do that second step differently. PNG is optimized for when the individual bit accuracy is important. JPEG is optimized for when the individual bit accuracy can be traded off so that the overall image information can have a higher number of pixels.

{sigh}

Please go study some information theory. Ten pounds of information doesn't fit in a five pound sack, no matter how you represent it. It's like why you can't keep gzip'ing a file over and over again to get a smaller file.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


In reply to •Re: Re: •Re: Re: •Re: Re: •Re: GIF patent by merlyn
in thread GIF patent by didier

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.