Micron Document
Scripts

curlimv temporarily downloads a file from the internet and allows you to open it with any image viewer using curl. You can change the image viewer in the script. gallery-dl can be combined with curlimv to resolve the direct link to an image from popular sites like DeviantArt: curlimv $(gallery-dl -G [link]).

Dependencies

- curl
- imv (as the default image viewer)
- gallery-dl (to resolve direct links to images from popular sites)


This script converts any image into an optimized progressive jpeg image, with simple options. It uses ffmpeg to resize and convert images into the png format for cjpegli or bmp format for cjpeg, which then converts the image into a jpeg image.

I created this tool because ffmpeg doesn't have the best jpeg encoder, since it doesn't have progressive image support nor good compression.

cjpegli has the best compression so it is used as the default however, you are able to use cjpeg if you like.

Dependencies

- ffmpeg
- libjxl (for cjpegli)
- libjpeg-turbo or mozjpeg (for cjpeg)

Help

Usage: cvrtjpg [options] <input file> [output file]

Options:
-c <cjpeg | cjpegli> Select which encoder to use (default is cjpegli)
-h <height> Select output height
-q <0-100> Select the quality
-w <width> Select output width
--help Print the help text


This script automatically creates directories and moves files with \ in the filename. Just run this script in the desired directory.