#logo #image #overlay #cli #watermark #command-line-tool

app ku-logo

A CLI tool to overlay logos on images with size and position control

2 stable releases

new 1.1.0 Nov 1, 2024
1.0.0 Oct 28, 2024

#125 in Images

Download history 242/week @ 2024-10-28

242 downloads per month

MIT license

12KB
125 lines

logo

A command-line tool for overlaying logos on images with precise control over size and position.

Features

  • Add a logo to any image
  • Control logo size as a percentage of the base image
  • Choose logo position (top-right, top-left, bottom-right, bottom-left)
  • Maintains logo aspect ratio
  • Supports various image formats (PNG, JPEG, etc.)

Installation

If you have Rust installed, you can install directly from crates.io:

cargo install ku-logo

Manual Installation

  1. Download the latest release for your platform from the releases page
  2. Extract the archive
  3. Add the binary to your PATH

For development setup, see the Development Setup section.

Development Setup

To set up the development environment, we use devenv.sh. This ensures a consistent development experience across different platforms.

  1. Install devenv following the instructions at devenv.sh/getting-started

  2. Clone the repository:

    git clone https://github.com/kualta/logo.git
    cd logo
    
  3. Initialize the development environment:

    devenv init
    
  4. Enter the development shell:

    devenv shell
    

This will set up all required dependencies, including:

  • Rust toolchain and cargo
  • Cross-compilation tools
  • Required system libraries

Available Scripts

  • hello - Test the development environment
  • build-linux - Build release binary for Linux

Run scripts using:

devenv run <script-name>

Usage

# Basic usage with default settings (5% size, top-right position)
logo -i input.png -l logo.png -o output.png

# Specify size and position
logo -i input.png -l logo.png -p 10 --position bottom-left -o output.png

# Show help
logo --help

Options

  • -i, --image <PATH> - Path to the base image
  • -l, --logo <PATH> - Path to the logo image
  • -p, --percentage <NUMBER> - Logo size as percentage (default: 5%)
  • --position <POSITION> - Logo position (top-right, top-left, bottom-right, bottom-left)
  • -o, --output <PATH> - Output path for the resulting image

License

This project is licensed under the MIT License - see the LICENSE file for details.

Dependencies

~7MB
~99K SLoC