• tetris11@lemmy.ml
    link
    fedilink
    arrow-up
    4
    arrow-down
    11
    ·
    4 months ago

    PNG started out as ZIP(BMP) and hasn’t gotten that much better. Use JPEG. The pixels you lose are not worth crying about

    • B0rax@feddit.org
      link
      fedilink
      arrow-up
      13
      ·
      4 months ago

      JPEG for graphics like screenshots is not very efficient. For stuff like that, png is simply superior. (But not with compression 0)

      PNG is not good for photos though.

      • tetris11@lemmy.ml
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        4 months ago

        why though? The graphics represented in the screen are already squashed and scaled, so you wouldn’t be preserving their quality in any case. If you’re worried about text, JPEG should still be able to handle it under high quality settings

        • B0rax@feddit.org
          link
          fedilink
          arrow-up
          7
          ·
          4 months ago

          We can ask the same the other way around: why do you want to use jpg if it results in a bigger size and worse quality than png?

          • tetris11@lemmy.ml
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            edit-2
            4 months ago

            But that’s patently untrue: take this 10 MB example TIFF file as an example.

            • PNG Compression, max compress (=quality 9):

              convert file_example_TIFF_10MB.tiff -quality 9 test.png
              
            • JPG Encoding, 99% quality (=quality 99):

              convert file_example_TIFF_10MB.tiff -quality 99 test.jpg
              

            Final file size comparison:

            9.7M Sep  5 13:21 file_example_TIFF_10MB.tiff
            1.7M Sep  5 13:22 test.jpg
            2.5M Sep  5 13:22 test.png
            

            PNG is significantly larger, and difference in quality between them is negligible

            • B0rax@feddit.org
              link
              fedilink
              arrow-up
              6
              ·
              4 months ago

              Dude. Did you even read what I wrote? PNG is bad for photos. Your example is a photo. Go ahead and try the same with a screenshot with text and menus showing.

            • ms.lane@lemmy.world
              link
              fedilink
              English
              arrow-up
              3
              ·
              4 months ago

              png - jpg

              156K Sep  5 23:06 Screenshot_20240905_230459.jpg
              137K Sep  5 23:05 Screenshot_20240905_230459.png
              

              jpg with 80% compression, via krita.

              As B0rax said, for screenshots, png is better - it can represent line graphics and text more efficiently.

              • tetris11@lemmy.ml
                link
                fedilink
                arrow-up
                1
                ·
                4 months ago

                Thanks for this. Still, I would be curious to see this for a 4K level image. Also I wonder if your screenshot tool did a bitmap copy of the screen or intrinsically converted it to PNG first before pasting it into your paint editor.

    • lemmyingly@lemm.ee
      link
      fedilink
      arrow-up
      12
      ·
      4 months ago

      Or they could just compression for their PNGs. PNG is a lossless format so they’ll only lose a fraction of a second during creation.

    • Lucy :3@feddit.org
      link
      fedilink
      arrow-up
      2
      ·
      4 months ago

      I use 4k because I like seeing a lot of stuff at the same time in good quality.
      I make screenshots of my whole screen to share all the stuff in the highest detail.
      Using jpeg would result in literally unreadable pictures.

      • VOwOxel@discuss.tchncs.de
        link
        fedilink
        arrow-up
        1
        ·
        4 months ago

        Depends on the Quality setting and version of jpeg. Even the original jpeg, on high quality, will result in little to no data loss. IIRC, Jpeg can even do lossless, with the only caveat being that it doesn’t save alpha channels (but screenshots don’t need to have transparency, anyway). Newer versions of jpeg, such as jpeg-2000 (and the much less broadly supported jpeg-XL) have much better compression and provide higher image quality at lower file size.

        “jpegification” or “Deep-frying” only really occurs with the original jpeg at low quality settings.