this post was submitted on 22 Jul 2023
376 points (95.2% liked)

linuxmemes

21761 readers
955 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 2 years ago
    MODERATORS
    376
    submitted 1 year ago* (last edited 1 year ago) by d_k_bo@feddit.de to c/linuxmemes@lemmy.world
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] ThirdNerd@lemmy.world 13 points 1 year ago (2 children)

    Here's my solution to WebP:

    #/bin/bash
    # -----------------------------------------------------------------------------
    # FILE PURPOSE AND NOTES:
    # Convert webp files to png in current directory
    #
    # -----------------------------------------------------------------------------
    
    echo "Convert Webp to Png"
    echo
    echo "Note this only works on webp files in the current directory:"
    echo "Right now, that is $(pwd)"
    echo
    read -p "Press any key to continue"
    echo
    
    for i in *.webp; do
      echo ".. Converting $i"
      ffmpeg -hide_banner -loglevel error -i "$i" "${i%%.*}.png"
    done
    
    echo
    echo "Here are the original webp and new png files now:"
    echo
    ls *.webp *.png
    echo
    echo "Ok to delete the webp files now? (Y/n)"
    read -p ": " ANSWER
    echo
    case $ANSWER in
      n|N)
        echo "Leaving webp files."
        ;;
      *)
        echo "Removing webp files.."
        rm -v *.webp
        ;;
    esac
    echo
    
    [–] KLISHDFSDF@lemmy.ml 15 points 1 year ago (2 children)

    What's the purpose of converting webp files to png? Isn't it potentially making the filesize bigger? Is it for compatibility for legacy apps?

    [–] ThirdNerd@lemmy.world 3 points 1 year ago

    Personally I don't care what format my pics are in (I don't use that many). But I get great satisfaction converting them out of Google's fav.

    [–] DahGangalang@infosec.pub 3 points 1 year ago

    Personally, imma use this script for the legacy compatibility.

    My use case is making maps and character tokens for Virtual Table Top games, and it feels like no one supports webp format. One of the standard tools I pull up when doing my thing is a webp to png converter.

    [–] mexicancartel@lemmy.dbzer0.com -4 points 1 year ago

    Fuck png too. This meme is about jxl for lower size