img2irc/README.md

84 lines
4.0 KiB
Markdown
Raw Permalink Normal View History

2024-11-03 02:17:09 +00:00
# img2irc (1.0.6)
2023-04-03 20:58:50 +00:00
![img2irc preview](https://i.imgur.com/oetHhMB.png)
2023-03-30 06:04:36 +00:00
2023-06-28 06:46:08 +00:00
img2irc is a utility which converts images to half or quarterblock irc/ansi art, with a lot of post-processing filters
2023-03-30 06:04:36 +00:00
2023-06-28 06:46:08 +00:00
*halfblock* means that each row will contain two rows worth of pixels, effectively doubling the vertical resolution
*quarterblock* (experimental) means that each row will contain two rows worth of pixels, and each column will contain two columns worth of pixels, quadrupling the resolution
2023-03-30 06:04:36 +00:00
2023-04-03 21:17:57 +00:00
the `irc` mode has 99 colours, the `ansi` mode has 256, `ansi24` has 16777216
2023-03-30 06:04:36 +00:00
2024-10-01 20:48:16 +00:00
# how to install
2024-06-08 07:09:31 +00:00
2024-10-01 20:48:16 +00:00
- ### download the linux binary
2024-06-08 08:58:07 +00:00
2024-10-01 20:48:16 +00:00
statically linked with musl, works on all x86_64 linux platforms
2024-06-08 08:58:07 +00:00
2024-10-01 20:48:16 +00:00
cd /tmp
wget https://github.com/waveplate/img2irc/releases/download/v1.0.4/img2irc-1.0.4-linux-x86_64.tar.gz
sudo tar -xzf img2irc-1.0.4-linux-x86_64.tar.gz -C /usr/local/bin --strip-components=1 img2irc-1.0.4/img2irc
rm -rf img2irc-1.0.4-linux-x86_64.tar.gz
2024-06-08 08:58:07 +00:00
2024-10-01 19:58:59 +00:00
2024-10-01 20:48:16 +00:00
- ### install with `yay` (arch linux)
2024-11-03 02:17:09 +00:00
>[!NOTE]
2024-10-01 20:48:16 +00:00
>if you like this project, i would appreciate you giving it a vote on the [aur](https://aur.archlinux.org/packages/img2irc)!
yay -S img2irc
2024-10-01 19:58:59 +00:00
2024-10-01 20:48:16 +00:00
- ### install with `cargo`
cargo install img2irc-rs
2024-10-01 19:58:59 +00:00
2024-10-01 20:48:16 +00:00
the binary will be installed to `~/.cargo/bin/img2irc`
2024-06-08 07:09:31 +00:00
2024-10-01 20:48:16 +00:00
# usage
2023-03-30 06:04:36 +00:00
2024-10-01 19:58:59 +00:00
`img2irc <URL or PATH> [OPTIONS]`
2023-03-30 06:04:36 +00:00
| option | description | default value |
| ------ | ----------- | ------------- |
| `<IMAGE>` | image url or file path | none |
| `--irc` | irc render type | true |
| `--ansi` | 8-bit ansi render type | false |
| `--ansi24` | 24-bit ansi render type | false |
2024-06-08 07:09:31 +00:00
| `--qb` | use quarterblocks (experimental) | false |
2023-03-30 06:04:36 +00:00
| `-w, --width <WIDTH>` | output image width in columns | 50 |
| `-b, --brightness=<BRIGHTNESS>` | adjust brightness (-255 to 255) | 0 |
| `-c, --contrast=<CONTRAST>` | adjust contrast (-255 to 255) | 0 |
| `-s, --saturation=<SATURATION>` | adjust saturation (-255 to 255) | 0 |
| `-H, --hue <HUE>` | rotate hue (0 to 360) | 0 |
| `-g, --gamma <GAMMA>` | adjust gamma (0 to 255) | 0 |
2023-03-30 06:04:36 +00:00
| `--dither <DITHER>` | dithering (1 to 8) | 0 |
| `--pixelize <PIXELIZE>` | pixelize pixel size | 0 |
| `--gaussian-blur <GAUSSIAN_BLUR>` | gaussian blur radius | 0 |
| `--oil <OIL>` | oil ("[RADIUS],[INTENSITY]") | |
| `--grayscale` | converts image to black and white |
2023-06-28 06:46:08 +00:00
| `--nograyscale` | exclude grayscale colours from the palette |
2023-03-30 06:04:36 +00:00
| `--halftone` | made up of small dots creating a continuous-tone illusion |
| `--sepia` | brownish, aged appearance like old photographs |
| `--normalize` | adjusts brightness and contrast for better image quality |
| `--noise` | random variations in brightness and color like film grain |
| `--emboss` | gives a raised, 3d appearance |
| `--box-blur` | smoothed appearance like frosted glass |
| `--identity` | no modifications, unchanged image |
| `--laplace` | enhances edges and boundaries in an image |
| `--noise-reduction` | reduces noise for a cleaner, clearer image |
| `--sharpen` | increases clarity and definition, making edges and details more distinct |
| `--cali` | cool blue tone with increased contrast |
| `--dramatic` | high contrast and vivid colors for a dramatic effect |
| `--firenze` | warm, earthy tones reminiscent of tuscan landscapes |
| `--golden` | warm, golden glow like sunset light |
| `--lix` | high-contrast black and white appearance with increased sharpness |
| `--lofi` | low-fidelity, retro appearance like old photographs or film |
| `--neue` | clean, modern appearance with neutral colors and simple design |
| `--obsidian` | dark, monochromatic appearance with black and gray shades |
| `--pastel-pink` | soft, delicate pink tint like pastel colors |
| `--ryo` | bright, high-contrast appearance with vivid colors and sharp details |
| `--invert` | colors are inverted, opposite on the color wheel |
| `--frosted-glass` | blurred, frosted appearance as if viewed through semi-transparent surface |
| `--solarize` | strange, otherworldly appearance with inverted colors and surreal atmosphere |
2023-06-23 02:32:20 +00:00
| `--edge-detection` | highlights edges and boundaries in an image |