ethumb

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 11 Imported by: 0

README

ethumb

ethumb ("efron's thumbnail") is a small tool to pre-process jpg and png images to create thumbnail output.

installation (library):

go get gitlab.com/efronlicht/ethumb/thumbnail@latest

installation (program):

go install gitlab.com/efronlicht/ethumb@latest

installation (program as tool)

#!/usr/bin/env bash

# in a directory with a go.mod file...
go get -tool gitlab.com/efronlicht/ethumb/thumbnail@latest

# then use with
go tool ethumb [-flag=value] path/to/file

usage

Usage of ethumb
  -border int
    	size of border, in pixels (default 5)
  -bordercolor value
    	color of the border (default white), as hex RGBA value (i.e, RRGGBBAA), e.g, 0xff0000ff for opaque red
  -dither
    	floyd-steinburg dither to reduce the color depth and further reduce file size
  -dst string
    	destination directory (default ".")
  -force
    	force overwrite destination files even if they already exist
  -printmarkdown
    	print markdown links for thumbnails
  -size int
    	max dimension to scale to (default 320)
  -suffix string
    	added destination file suffix before .png: e.g, input_thumb.png (default "_thumb")
example: generate the thumbnail and literal markdown for this readme :
input
#!/usr/bin/env bash
ethumb -printmarkdown -size 320 -suffix thumb_320 aa_cover.png
stderr

thumb: thumbnail.go:83: aa_cover.png [8213 KiB] -> aa_cover_thumb_320.png [103 KiB]:

stdout
[![aa_cover_thumb.png](aa_cover_thumb_320.png)](aa_cover.png)

Or in other words...

aa_cover_thumb.png

Documentation

Overview

ethumb - create thumbnails of images and generate markdown links for them with optional borders. try `ethumb -help` or go to https://gitlab.com/efronlicht/ethumb for more info.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL