Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
Created November 24, 2024 22:06
Show Gist options
  • Save ErykDarnowski/505fd6144179ae8ffe9b3dccee41c916 to your computer and use it in GitHub Desktop.
Save ErykDarnowski/505fd6144179ae8ffe9b3dccee41c916 to your computer and use it in GitHub Desktop.
`heif-convert` convert all `.heic` files to `.png`

This snippet will (in current dir):

  1. Convert all files of .heic / .HEIC extension to ones with .png.
  2. Remove all original .heic files.
find . -type f -iname '*.heic' -print0 | while IFS= read -r -d '' file; do heif-convert "$file" -f "png" && rm "$file"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment