Compare commits

..
3 Commits
Author SHA1 Message Date
Periodic 8f561a9586 Adds a note for an imagemagick command that resizes and optimizes. 2026-09-02 11:28:41 -07:00
Periodic 92da1517b5 Adds Useful Utilities note. 2026-08-26 09:49:21 -07:00
Periodic 4850ed286f Removes unused public files 2026-08-26 09:44:08 -07:00
24 changed files with 21 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

@@ -0,0 +1,21 @@
---
title: Useful Utilities
---
Here's a small collection of various utilities and recipes I find useful. It's not organized in a particular way, but more as a long-term memory for me.
## JPEG Optimization
[jpegoptim](https://github.com/tjko/jpegoptim) is a handy little utility for doing JPEG optimization. I use it to compress files and strip EXIF data. Here's an example that will process all the files in the current directory and compress them to a reasonable 85.
```bash
nix run 'nixpkgs#jpegoptim' -- --max=85 --strip-all *.jpg
```
The major issue with `jpegoptim` is that it doesn't do resizing. Image Magick is the Swiss army knife of image manipulation and can do it all, but it's a much larger piece of software. This can quickly reduce a full-size camera image (~5MB) to something suitable for web uploads, thumbnails or avatars (50kB).
```bash
nix run 'nixpkgs#imagemagick' -- input.jpg -resize 1200x800 -strip -quality 85 output.jpg
```
There are lots of options that can be passed to the [image geometry](https://imagemagick.org/command-line-processing/#geometry). The default for pixel sizes is to treat it as a maximum and preserve the aspect ratio. If only a width is given then height is automatically determined from the aspect ratio.