Announcement

Collapse
No announcement yet.

Mozjpeg 2.0 Improves JPEG Encoding

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by DebianLinuxero View Post
    Why is so important JPEG over more modern formats like PNG?

    Why camera and video-camera brands don't use it in its products if they could save royalty's money?

    Is so bad PNG?

    Please, educate me.
    Show me the cellphone or point and shoot camera that spits out anything other then JPEG files. JPEG, like MP3 is never going away, both do their task adequately enough that there is no reason to move from them. The same isn't true yet for video files, but it will be probably a little bit after 8K video becomes common. At 8K there really isn't much reason to go higher resolution for any screen up to 100", past that you are looking at arena style screens like Jumbotrons.

    Comment


    • #12
      Originally posted by Kivada View Post
      Show me the cellphone or point and shoot camera that spits out anything other then JPEG files. JPEG, like MP3 is never going away, both do their task adequately enough that there is no reason to move from them. The same isn't true yet for video files, but it will be probably a little bit after 8K video becomes common. At 8K there really isn't much reason to go higher resolution for any screen up to 100", past that you are looking at arena style screens like Jumbotrons.
      [offtopic]
      As somebody who's never seen a 4k monitor, but owns a 1080p 21' monitor, is there even a reason for 8K? It seems like 4K would be perfect up to ~32', at which point the screen size is just unruly. I think most people would just go for dual-27' monitors or something.

      Comment


      • #13
        Originally posted by Daktyl198 View Post
        [offtopic]
        As somebody who's never seen a 4k monitor, but owns a 1080p 21' monitor, is there even a reason for 8K? It seems like 4K would be perfect up to ~32', at which point the screen size is just unruly. I think most people would just go for dual-27' monitors or something.
        I've had a 24" and a 27" monitors side-by-side, both 1080. I can tell you that I noticed the difference. 32" and maybe even 40" is ideal for 4k. As a comparison, for a 27" monitor with 1920x1080 resolution the pixel density amounts to 81.59 PPI (pixel per inch) while a 40" 3840x2160 resolution gives you 110.15 PPI. 32" for the same resolution would give 137.68 PPI and let's not get into 8k territory!

        I would think that even for Jumbotrons it doesn't make sense having something above 8k. But you never know, new uses could be found. They were saying 640kilobytes should be enough for everybody a while back.

        Comment


        • #14
          Originally posted by Kivada View Post
          Show me the cellphone or point and shoot camera that spits out anything other then JPEG files.
          There are actually point and shoot cameras that output raw.



          Originally posted by DebianLinuxero View Post
          Why is so important JPEG over more modern formats like PNG?

          Why camera and video-camera brands don't use it in its products if they could save royalty's money?

          Is so bad PNG?

          Please, educate me.
          JPEG: compromises photo quality in exchange for a smaller file (you can fit more photos in your memory card). This is good for cameras and even better for regular phones that have low storage space. It also obviously reduces storage bandwidth allowing for higher FPS when shooting continuous photos.

          PNG = perfect (usually 24bpp) photo quality, much bigger file size. PNG is actually a bitmap compressed with zlib, therefore it will compress very well images that are low in fine grained detail such as comics or a screenshot of phoronix :P. It will however compress horribly photos because usually they have "random" noise.

          RAW = many cameras can shoot in a "raw" format (this format can vary between camera brands) that can take full advantage of your camera's sensor by being able to store pixels exacly as they are present in the sensor (usually not RGB but something like this, and maybe rotated 45 too!) and with the bit resolution that fully exploits your camera's ADC (example: 14 bits per channel). These are sometimes also compressed (lossless!) however as you can imagine they will be huge! They are perfect for post-processing though.

          Comment


          • #15
            Originally posted by Nouser View Post
            PNG is terrible for storing photographs since is lossless, and real photographs has tons of irregular details and noise that makes them difficult to compress without losing information. JPEG in the other hand is designed to make the loss of quality the less noticeable possible while compressing the contents as much as possible.

            Anyway, any serious camera already produces photographs in HDR format.
            Actually PNG is great for photographs. It can store larger color depth than JPG, support color profiles and even alpha channel. The problem is the file size, but if you need a lossless format for editing, it's not bad. JPG as a lossy format is much better for distribution on web.

            HDR format, eh? You should know that even JPG has enough dynamic range for HDR photos.. you probably mean RAW formats.

            Comment


            • #16
              Originally posted by caligula View Post
              Actually PNG is great for photographs. It can store larger color depth than JPG, support color profiles and even alpha channel. The problem is the file size, but if you need a lossless format for editing, it's not bad.
              Wrong. There are virtually no cameras that store pixels in RGB order (like PNG does) and AFAIK there is absolutely none that takes pictures with an alpha channel. Storing photos with all 3 components per pixel is actually increasing the amount of useless (interpolated) information.

              Originally posted by caligula View Post
              HDR format, eh? You should know that even JPG has enough dynamic range for HDR photos.. you probably mean RAW formats.
              No.
              You probably mean tone-mapped HDR photos, which is just a technique to make photos appear to have a big dynamic range by using optical tricks distorting the actual colors.

              Comment


              • #17
                Just a few nitpicks on the comments so far.

                JPEG/WebP support lossless compression too, and will beat PNG on natural images (photos).

                If you look closer, JPEG is also using Huffman coding like PNG. The difference to PNG is that the image is transformed into frequency domain before compression. This can allow for better compression (depending on the image) and better quantization (lossy compression).

                You can apply quantization to PNG too (make it lossy), as stated above already, but the artifacts are much more visible than with JPEG frequency domain quantization, especially when quantization coefficients can be tuned for human perception. The same trick is used in audio compression.

                Comment


                • #18
                  Originally posted by log0 View Post
                  If you look closer, JPEG is also using Huffman coding like PNG.
                  PNG uses deflate/LZ, not Huffman.
                  And JPEG also converts RGB images into a YUV colour space, which allows for chroma sub-sampling, saving even more space.

                  Comment


                  • #19
                    Thanks to all for the reponses.

                    Comment


                    • #20
                      Originally posted by log0 View Post
                      JPEG/WebP support lossless compression too, and will beat PNG on natural images (photos).
                      Do you mean JPEG LS - which is a different standard and is not supported by any JPEG decoder (it is a different format altogether) or the libjpeg 9 lossless compression mode which is a non-standard extension that will probably never be supported by anything else than libjpeg (for example libjpeg- turbo which is the most used implementation of a JPEG decoder). Also both use a different approach to lossless compression than lossy JPEG does.

                      It is similar for WebP - it uses a different approach for lossy and lossless.

                      Originally posted by log0 View Post
                      You can apply quantization to PNG too (make it lossy), as stated above already, but the artifacts are much more visible than with JPEG frequency domain quantization, especially when quantization coefficients can be tuned for human perception. The same trick is used in audio compression.
                      This is similar as first compress with JPEG, decompress and then compress with PNG. The size of PNG will be smaller than original but not even close to that of the intermediate JPEG file. Using approaches like this will never be as efficient as a designed lossy codec.

                      Comment

                      Working...
                      X