Skip to content

Instantly share code, notes, and snippets.

@ugovaretto
Created April 16, 2023 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ugovaretto/1c1c79f85e46d85461cd9c23b8d50a44 to your computer and use it in GitHub Desktop.
Save ugovaretto/1c1c79f85e46d85461cd9c23b8d50a44 to your computer and use it in GitHub Desktop.
Convert HEIC to JPEG (Haskell version)
import System.Directory
import System.FilePath
import Control.Monad
import System.Process
import Data.Char
main = do
c <- listDirectory "."
f <- filterM (\x -> return (map toLower (snd(splitExtension x)) == ".heic")) c
mapM (\x -> callProcess "convert" [x, (dropExtension x) ++ ".jpg"]) f
return ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment