#image #convert-images #graphics #utility #cli #tool

应用 dipc

使用您喜欢的调色板/主题将您喜欢的图像和壁纸转换

7 个版本 (1 个稳定版本)

1.0.0 2023年5月1日
0.5.0 2023年4月23日
0.4.0 2023年4月23日
0.3.1 2023年4月21日
0.2.1 2023年4月18日

#616 in 图像

Download history 26/week @ 2024-03-09 5/week @ 2024-03-16 38/week @ 2024-03-30 9/week @ 2024-04-06 1/week @ 2024-04-27

每月111次下载

MIT/Apache

2MB
675

dipc

crates.io

dipc light icon

doprz的图像调色板转换器

使用您喜欢的调色板/主题将您喜欢的图像和壁纸转换

调色板/主题

  • catppuccin
  • dracula
  • edge
  • everforest
  • gruvbox
  • gruvbox-material
  • nord
  • onedark
  • rose-pine
  • solarized
  • tokyo-night

示例

dipc examples

图像来源

Paul Bill - https://unsplash.com/@hoffman11

Adrien Vajas - https://unsplash.com/@adrien_vj

Filipp Romanovski - https://unsplash.com/@filipp_roman_photography

安装

Homebrew

brew tap doprz/dipc
brew install dipc

Cargo

cargo install dipc

从源代码

要源码构建和安装,首先检出您想要安装的标签或分支,然后运行

cargo install --path .

这将构建并安装 dipc 到您的 ~/.cargo/bin。请确保 ~/.cargo/bin 已添加到您的 $PATH 环境变量中。

用法

Convert your favorite images and wallpapers with your favorite color palettes/themes

Usage: dipc [OPTIONS] <PALETTE> [FILE]...

Arguments:
  <PALETTE>
          The color palette to use:
              - name of a builtin theme
              - path to a theme in JSON
              - a JSON string with the theme (starting with `JSON: {}`)
          Run with --help instead of -h for a list of all builtin themes

          Builtin themes:
              - catppuccin
              - dracula
              - edge
              - everforest
              - gruvbox
              - gruvbox-material
              - nord
              - onedark
              - rose-pine
              - solarized
              - tokyo-night

  [FILE]...
          The image(s) to process

Options:
  -s, --styles <VARIATIONS>
          The color palette variation(s) to use
          Run with --help instead of -h for a list of all possible values

          Possible values:
              - `all` to generate an image for each of the variations
              - `none` if you are using a flat theme without variations
              - or a comma-delimited list of the names of variations it should use

          [default: all]

  -o, --output <PATH>
          Output image(s) name/path as a comma-delimited list

  -d, --dir-output <PATH>
          Output directory name/path

  -m, --method <METHOD>
          CIELAB DeltaE method to use

          [default: de2000]

          Possible values:
          - de2000:  The default DeltaE method
          - de1994g: CIE94 DeltaE implementation, weighted with a tolerance for graphics
          - de1994t: CIE94 DeltaE implementation, weighted with a tolerance for textiles
          - de1976:  The original DeltaE implementation, a basic euclidian distance formula

  -v, --verbose...
          Verbose mode (-v, -vv, -vvv)

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

转换目录中的所有图像

# Save to current directory
dipc <PALETTE> <INPUT_DIR>/*

# Save to output directory
dipc --dir-output <PATH> <PALETTE> <INPUT_DIR>/*

转换多个图像

dipc <PALETTE> img0.png img1.png

# Rename files
dipc --output new-img0.png,new-img1.png <PALETTE> img0.png img1.png

调色板/风格变化

dipc --styles Style0 <PALETTE> img.png
dipc --styles Style0,Style1 <PALETTE> img.png

CIELAB DeltaE 方法

dipc --method <METHOD> <PALETTE> img.png

许可

dipc 在 MIT 许可证和 Apache 许可证 2.0 的条款下双许可

SPDX-License-Identifier: MIT OR Apache-2.0

依赖关系

~27–36MB
~298K SLoC