#元の #な正方形を #をその #長辺に #わせて #ツール #に配置します #機能 #任意の

app squarize

A simple CLI tool to squarize images by padding them with transparent pixels

2 releases

Uses new Rust 2024

0.1.1 Apr 21, 2025
0.1.0 Apr 2, 2025

#180 in Images

Download history 141/week @ 2025-04-02 6/week @ 2025-04-09 106/week @ 2025-04-16 25/week @ 2025-04-23 8/week @ 2025-04-30 13/week @ 2025-05-07 11/week @ 2025-05-14

82 downloads per month

MIT license

675KB

Squarize

PNG 画像を正方形に変換するシンプルな Rust ツール。長辺に合わせて透明な正方形を作成し、元の画像をその中央に配置します。

機能

  • 任意のサイズの画像を正方形に変換
  • 透明な背景で余白を埋める
  • 元の画像は中央に配置

インストール

cargo install squarize

使い方

squarize <入力画像のパス> <出力画像のパス>

例:

squarize input.png output.png

実行例

変換前

変換後

依存ライブラリ

  • image: 画像処理
  • clap: コマンドライン引数の解析

Dependencies

~4.5MB
~84K SLoC