• PartyAt15thAndSummit@lemmy.zip
    link
    fedilink
    arrow-up
    45
    ·
    edit-2
    1 day ago

    pngcrush gets it down to 21.1 kB with no loss of quality.
    I tried posting the file, but Lemmy converts it to the atrocious webp format automatically.
    EDIT: JPEG-XL clocks in at just 16.3 kB, again with no loss of quality.

    • MHLoppy@fedia.io
      link
      fedilink
      arrow-up
      8
      ·
      7 hours ago

      the atrocious webp format

      I continue to be confused by the level of widespread hate WebP still gets. It’s old enough to be widely (albeit not universally) supported in software like web browsers, but new enough to provide similar-or-better (usually better) lossless compression than PNG (21,578 bytes for the original image) and typically better lossy compression than JPEG at comparable perceived quality, especially for the types of images typically shared on the internet (rather than say, images saved directly from a DLSR camera). It’s why servers bother to re-encode JPEG images to WebP for delivery - they wouldn’t bother wasting the compute time to re-compress if it wasn’t generally worth doing.

      I can understand it if we were, say, 10-15 years ago when the format was still not super widely supported yet, but that’s basically where we are with JPEG XL and AVIF support right now too. If one of these two had exactly the level of support that WebP does right now then yes, of course we should probably use one of them instead - but we’re not there yet. Until we are, WebP often has the best compromise between compatibility and compression efficiency as far as image formats go, and that’s why a lot of sites do this re-compression thing using WebP. I gave some examples using digital art (one of the things I was compressing a lot at the time) a year ago in a related discussion: https://lemmy.world/post/6665251/4462007

      A news website local to me recently-ish started choosing to deliver AVIF-compressed (or probably re-compressed) images the same way a lot of sites currently do it for WebP because my browser supports AVIF, so at least we are starting to see a token amount of uptake on the next-gen formats in the wild.

      • Dr. Moose@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        7 hours ago

        I’m a dev and webp is incredible. Don’t really understand the hate - it’s a libre format that is lighyears ahead of png or jpg in every measurable metric. The lack of support is entirely on app developers and their incompetence not the format.

        The other formats like jpeg xl are only catching up now when webp was out for 14 years already.

    • twice_hatch@midwest.social
      link
      fedilink
      English
      arrow-up
      35
      ·
      1 day ago

      Excuse me, I forgot the text. Wouldn’t be fair without all that entropy. To make up for it, I turned on chroma subsampling. This one is 39 KiB.

      • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 @pawb.social
        link
        fedilink
        English
        arrow-up
        19
        ·
        edit-2
        1 day ago

        To be more accurate, the dithering was more specific to animated gifs and not static pictures. Unless you go back really far… I remember finding porn on 5 inch floppies my dad had in his closet and even the non-animated images were black & white and dithered to hell. Though I am pretty sure he didn’t obtain those off the internet.

      • insomniac_lemon@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        6
        ·
        edit-2
        1 day ago

        I turned on chroma subsampling

        A simplified polygonal scene, originally from Futurama scene that's styled like anime. Fry is saying "You and I are enemies now." while pointing at a jpegified Professor Farnsworth. Meta note: The scene was made in the Godot game engine.

        43KiB, though obviously a chunk of that is from the colors of the jpg Professor.

        EDIT: I just noticed webp messes with colors around the edges too (which would matter more if I cut the resolution in half or so). The original .png (what I actually uploaded) doesn’t at 51.6KiB.

        Also obviously this would be less data in non-pixel format (well, it’d likely be eaten up by overhead for packaging, though after that it would allow tons of art for negligible data cost). Would be smaller as an svg for example (or an swf).

        • LostXOR@fedia.io
          link
          fedilink
          arrow-up
          36
          ·
          1 day ago

          Depends on what you consider readable, but I got it down to 2842 bytes by downscaling it and using an absolutely atrocious quality setting:

          Image

          That’s just small enough to fit inside a QR code, so I did that! (You probably can’t scan it with a typical QR reader; you need something like zbar that supports reading binary data).

          • LandedGentry@lemmy.zip
            link
            fedilink
            English
            arrow-up
            20
            ·
            1 day ago

            You’re fun. That may sound sarcastic, but I’m being serious lol. Learned a lot in just two comments and you just seem very cheerful writing it all/messing with this.

          • einfach_orangensaft@sh.itjust.worksOP
            link
            fedilink
            arrow-up
            11
            ·
            1 day ago

            nice :D

            in a different timeline where the GIF89 specification would not have been mostly ignored, it would have been possible to go even smaller.

            “The GIF89 specification allows you to specify text captions to be overlayed on the following image. This feature never took off; browsers and image-processing applications such as Photoshop ignore it”

            Meaning if your gif viewing client supports full GIF89 then you could just display the text over a 1x1 pixel image, shrinking the file size down to something in the range of < 100bytes.

            • GreatAlbatross@feddit.uk
              link
              fedilink
              English
              arrow-up
              2
              ·
              22 hours ago

              In that vein, I’d be interested to see if someone could Inkscape it into an SVG with embedded text.

              Though I have no idea how many vectors would be needed to make the image similar enough.

              • einfach_orangensaft@sh.itjust.worksOP
                link
                fedilink
                arrow-up
                1
                ·
                19 hours ago

                The SVG send me down a rabid hole, apparently SVG embedded text is actually selectable and all, this is basically what gif tryed to do and failed lol

                but sadly lemmy dosent seem to let upload .svg :/

      • PeriodicallyPedantic@lemmy.ca
        link
        fedilink
        arrow-up
        4
        ·
        1 day ago

        Dithering is much older than jpeg.

        They used dithering in printed media, so it was transfered to digital media as a way to save on color depth, before jpeg got invented.

  • aeronmelon@lemmy.world
    link
    fedilink
    arrow-up
    34
    ·
    1 day ago

    We listened to music as 41kB RealAudio files that sounded like the song was underwater, which was the style at the time.

    • einfach_orangensaft@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      1 day ago

      i mean yeah, its a honest loss of information, jpg on the other hand introduces compression artifacts that are basically hallucinations, meaning it pretends to have more data than it actually has and humans compensate for that thru image recognition and fantasy.

    • tias@discuss.tchncs.de
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      1 day ago

      It’s really only helpful for formats that will be directly read by hardware (the video chip) and where the “compression” ratio (I would prefer the term quantization) needs to be fixed. For file compression, which was quite mature but CPU- and memory-intensive at the time, the dithering only makes it more difficult to compress further.

      Compressed textures on modern GPUs actually use similar compression: a color palette followed by indexes into the palette. But that’s done per 4x4 pixel block.

        • tias@discuss.tchncs.de
          link
          fedilink
          arrow-up
          1
          ·
          19 hours ago

          At the time when dithering was commonly used to achieve the illusion of more available colors, i.e. the 80s and the first half of the 90s.

          • PeriodicallyPedantic@lemmy.ca
            link
            fedilink
            arrow-up
            1
            ·
            edit-2
            19 hours ago

            I’m not really convinced that file compression was “mature” at the time. Text compression was reasonable progressed but image compression was created for a reason besides just a requirement for fixed compression ratio.

            But I do agree that dithering was limited in it’s usefulness.

            My point was just that dithering existed in print media, so it was one of the first ways they used to reduce image size, they just copied over the same technique

            • tias@discuss.tchncs.de
              link
              fedilink
              arrow-up
              5
              ·
              edit-2
              19 hours ago

              I’m thinking of file compression formats like Zip, LHA and ARJ, which would work particularly well if the image was not dithered and used run-length encoding (e.g. the PIC format of the Atari ST). The PNG format still uses the deflate algorithm which is essentially identical to the compression used by PKZip in 1991.

  • Cris@lemmy.world
    link
    fedilink
    English
    arrow-up
    23
    ·
    edit-2
    1 day ago

    Dithering is so fucking cool. At some point I wanna check out that game that uses a ton of really stylized dithering - return of the obra djin I think?

    • tiramichu@lemm.ee
      link
      fedilink
      arrow-up
      5
      ·
      19 hours ago

      Dithering is still to this day extremely useful for making custom wall art in Minecraft using maps, because maps have a very specific and limited pallette.

    • VitoRobles
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      21 hours ago

      Obra Dinn’s filter hurt my eyes. A lot of these filters do and glad many are toggles in the options.

      • Cris@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 hours ago

        That’s very fair, that’s a consequence of using a shader based artstyle I really hadn’t considered