Skip to content

Instantly share code, notes, and snippets.

@jaypowley
Created February 8, 2019 03:29
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 jaypowley/69aeaadbe23dedf0f14d0611df94cbf8 to your computer and use it in GitHub Desktop.
Save jaypowley/69aeaadbe23dedf0f14d0611df94cbf8 to your computer and use it in GitHub Desktop.
Quick resize of jpegs in a directory using F# and ImageResizer
#r @"C:\Shared Resources\ImageResizer\ImageResizer.4.2.5\lib\net45\ImageResizer.dll"
open ImageResizer
open System.IO
let sourceFolder = @"C:\images2resize"
let images = Directory.GetFiles(sourceFolder, "*.jpeg", SearchOption.AllDirectories)
let resizeImages =
for image in images do
let settings = new ResizeSettings("width=375&quality=95&autorotate=false&srotate=90")
ImageBuilder.Current.Build(image, image, settings);
resizeImages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment