Skip to content

Instantly share code, notes, and snippets.

@HerbFargus
HerbFargus / mogrify-tif-to-png.bat
Created March 28, 2024 04:29
imagemagick mogirfy convert folder of tif files into pngs in a folder called "processed"
magick mogrify -path processed/ -format png *.tif
@HerbFargus
HerbFargus / mogrify-remove-profile.bat
Created March 28, 2024 04:26
imagemagick mogrify remove color profile in place
magick.exe mogrify +profile * *.tif
@HerbFargus
HerbFargus / mogrify-color-profile.bat
Created March 28, 2024 04:23
Imagemagick mogrify - bake in color profile of tifs in folder without attaching profile - in this case converting a scanner color correction to sRGB
magick mogrify -strip -profile .\EpsonV600IT8.icc -profile .\sRGB_v4_ICC_preference.icc +profile * *.tif
@HerbFargus
HerbFargus / pdfimages
Created November 28, 2022 06:41
pdfimages
pdfimages -png "input.pdf" output
@HerbFargus
HerbFargus / pdftoppm
Created November 28, 2022 06:16
pdftoppm
pdftoppm -png "input.pdf" output
@HerbFargus
HerbFargus / image2pdf
Created November 21, 2022 04:57
image2pdf sorted
find . -name '*.jpg' -print0 | sort -z -V | xargs -0r img2pdf -o out.pdf
@HerbFargus
HerbFargus / renamepadzeros.sh
Created April 8, 2022 22:49
rename all integers with padded 0 eg 1-4-5.jpg to 01-04-05.jpg
rename 's/\d+/sprintf("%02d",$&)/ge' *.jpg
@HerbFargus
HerbFargus / montage.sh
Created April 8, 2022 22:47
Imagemagick Montage Grid (combines two montage commands to make a grid of jpegs)
montage *.jpg -tile 1x9 -geometry +0+0 miff:- | montage - -geometry +0+0 -tile 10x1 "output.jpg"
@HerbFargus
HerbFargus / wgetbashbrace.sh
Created April 8, 2022 22:46
wget bash brace expansion (increments fields in brackets)
wget www.url.com/4-{0..9}-{0..8}.jpg
@HerbFargus
HerbFargus / dialogrc
Created October 25, 2021 21:10
dark dialogrc settings for dialog gui
#
# Run-time configuration file for dialog
#
# Automatically generated by "dialog --create-rc <file>"
#
#
# Types of values:
#
# Number - <number>
# String - "string"