From ddbf85e04cfec70388530edde4a2dc159ff99552 Mon Sep 17 00:00:00 2001 From: Morgan <2504532+mrgnw@users.noreply.github.com> Date: Wed, 12 Mar 2025 00:42:13 +0100 Subject: [PATCH] shortcuts for encoding to jpg or jxl --- jpg | 12 ++++++++++++ jxl | 8 ++++++++ 2 files changed, 20 insertions(+) create mode 100755 jpg create mode 100755 jxl diff --git a/jpg b/jpg new file mode 100755 index 0000000..77eaf4a --- /dev/null +++ b/jpg @@ -0,0 +1,12 @@ +#!/usr/bin/env zsh + +if [[ -z "$1" ]]; then + echo "Usage: heic_to_jpg [output_file.jpg]" + return 1 +fi + +local input_file="$1" +local output_file="${2:-${input_file%.*}.jpg}" + +sips -s format jpeg "$input_file" --out "$output_file" +echo "Converted to $output_file" diff --git a/jxl b/jxl new file mode 100755 index 0000000..9d70b25 --- /dev/null +++ b/jxl @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ $# -eq 1 ]; then + base="${1%.*}" + cjxl "$1" "${base}.jxl" +else + cjxl "$@" +fi \ No newline at end of file -- knotmirror 0.0.1