Sign inSign up

essentialkaos/rsz

By essentialkaos

Updated 16 days ago

Simple utility for image resizing

Image
Developer tools
0

2.6K

essentialkaos/rsz repository overview

GitHub Actions CI Status GoReportCard Codebeat badge GitHub Actions CodeQL Status

InstallationCommand-line completionMan documentationUsageCI StatusContributingLicense


rsz is a simple utility for image resizing.

Installation
From source

To build the rsz from scratch, make sure you have a working Go 1.17+ workspace (instructions), then:

go install github.com/essentialkaos/rsz@latest
Prebuilt binaries

You can download prebuilt binaries for Linux and macOS from EK Apps Repository:

bash <(curl -fsSL https://apps.kaos.st/get) rsz
Docker Image

The latest version of rsz also available as Docker image on Docker Hub and GitHub Container Registry:

docker pull essentialkaos/rsz:latest
docker run --rm -it essentialkaos/rsz:latest image.png 0.55 thumbnail.png

or

docker pull ghcr.io/essentialkaos/rsz:latest
docker run --rm -it ghcr.io/essentialkaos/rsz:latest image.png 0.55 thumbnail.png
Command-line completion

You can generate completion for bash, zsh or fish shell.

Bash:

sudo rsz --completion=bash 1> /etc/bash_completion.d/rsz

ZSH:

sudo rsz --completion=zsh 1> /usr/share/zsh/site-functions/rsz

Fish:

sudo rsz --completion=fish 1> /usr/share/fish/vendor_completions.d/rsz.fish
Man documentation

You can generate man page using next command:

rsz --generate-man | sudo gzip > /usr/share/man/man1/rsz.1.gz
Usage
Usage: rsz {options} src-image size output-image

Options

  --filter, -f name     Resampling filter name
  --list-filters, -F    Print list of supported resampling filters
  --no-color, -nc       Disable colors in output
  --help, -h            Show this help message
  --version, -v         Show version

Examples

  rsz image.png 256x256 thumbnail.png
  Convert image to exact size

  rsz -f Lanczos image.png 256x256 thumbnail.png
  Convert image to exact size using Lanczos resampling filter

  rsz image.png 25% thumbnail.png
  Convert image to relative size (25% of original)

  rsz image.png 0.55 thumbnail.png
  Convert image to relative size (55% of original)
CI Status
BranchStatus
masterCI
developCI
Contributing

Before contributing to this project please read our Contributing Guidelines.

License

Apache License, Version 2.0

Tag summary

Content type

Image

Digest

sha256:a650f8397

Size

12 MB

Last updated

16 days ago

docker pull essentialkaos/rsz