abcnews/batch-resize-images

Name: batch-resize-images

Owner: ABC News

Description: Batch resize images to fit a certain ratio & min-width

Created: 2018-01-15 08:07:33.0

Updated: 2018-01-15 10:52:11.0

Pushed: 2018-01-15 08:17:12.0

Homepage: null

Size: 444

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Bash script to resize images to a particular ratio, with a blurred background where the image is not in the same ratio.

By default this converts to 3x2 ratio, with a min-width ot 700 px.

Run on a single file with:

.sh <filename>

Run recursively finding all .jpgs in a folder with:

_in_folder.sh <folder>

Examples

Squareish image

The original source image is resized to fit inside the 3x2 frame

squareish source image with yellowish colour 3x2 image with yellowish colour with source image horizontally centered

Wide source image

Both wide and tall images are supported by this script

wide source image 3x2 image with image vertically centered

Tiny source images

Tiny source images will be scaled up 150% so they're legible on mobile, but remain centered in the overall image.

tiny image 3x2 image with original centered at 150% of the original size

Background blur example

The background blur effect means the colour and theme is continued throughout the image

squareish source image with grey colour 3x2 source image with grey colour with source image horizontally centered


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.