Skip to content

Obsidian-OS/obsidianwall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

ObsidianOS Wallpaper Compositor (obsidianwall)

obsidianwall is a powerful Bash script designed to compose and manipulate wallpapers using ImageMagick. It allows you to combine a background image with an overlay, apply various artistic and photographic effects, perform transformations, and add watermarks, all through a simple command-line interface. Highly inspired by instantWALLPAPER

Features

  • Image Composition: Overlay images onto a background with control over scaling, position, and gravity.
  • Extensive Image Effects: Apply a wide range of effects including blur, shadow, brightness, contrast, saturation, hue, gamma, vignette, noise, sharpen, emboss, sepia, polaroid, sketch, charcoal, oil paint, edge detection, solarize, and posterize.
  • Distortion Effects: Experiment with wave, swirl, implode, and spread distortions.
  • Borders and Frames: Add custom borders with specified width and color.
  • Color Adjustments: Fine-tune colors with options for tint, threshold, levels, colorspace conversion, modulation, channel effects, and color matrices.
  • Geometry and Cropping: Perform cropping, trimming, chopping, splicing, extending, and content-aware resizing (liquid rescale).
  • Transformations: Flip, flop, transpose, transverse, and roll images.
  • Advanced Blurring and Sharpening: Utilize adaptive blur, adaptive sharpen, bilateral blur, motion blur, radial blur, and selective blur.
  • Annotation and Watermarking: Add text annotations and image watermarks with customizable position, font, size, color, and opacity.
  • Comprehensive Image Processing: Supports various compression types, color depths, ICC profiles, interlacing, and resize filters.

Requirements

  • ImageMagick 7+: The script relies heavily on the magick command-line tool.
    • ObsidianOS and Arch GNU/Linux: sudo pacman -S imagemagick

Installation

Through the AUR:

yay -S obsidianwall-git  # or paru

From source

  1. Clone the repository and cd:
    git clone https://github.com/Obsidian-OS/obsidianwall
    cd obsidianwall
  2. Make the script executable:
    chmod +x obsidianwall
  3. (Optional) Add to your PATH: For easier access, you can move the script to a directory included in your system's PATH, e.g., /usr/local/bin:
    sudo mv obsidianwall /usr/local/bin/

Usage

The basic syntax for obsidianwall is:

obsidianwall [OPTIONS] [INPUT] [OVERLAY] [OUTPUT]
  • INPUT: The path to your background image.
  • OVERLAY: (Optional) The path to the image you want to overlay.
  • OUTPUT: The desired path for the output image.

If INPUT, OVERLAY, or OUTPUT are not provided as positional arguments, the script will use default values: photo.jpg, /usr/share/pixmaps/obsidianos.png, and obsidian-wallpaper.png respectively.

Basic Example

obsidianwall input.jpg overlay.png output.png

Options

Here's a detailed list of available options:

Basic Options

  • -i, --input FILE: Input image file (default: photo.jpg)
  • -o, --overlay FILE: Overlay image file (default: /usr/share/pixmaps/obsidianos-logo.png)
  • -O, --output FILE: Output image file (default: obsidian-wallpaper.png)
  • -s, --scale PERCENT: Overlay scale percentage (default: 30)
  • -g, --gravity POSITION: Overlay position (default: center)
  • -r, --resolution WxH: Force output resolution (e.g., 1920x1080)
  • -q, --quality PERCENT: JPEG quality (default: 95)
  • -f, --format FORMAT: Output format (auto-detect from extension, e.g., png, jpg)

Positioning Options

  • --offset-x PIXELS: Horizontal offset from gravity point (default: 0)
  • --offset-y PIXELS: Vertical offset from gravity point (default: 0)
  • --gravity-list: List all available gravity positions

Overlay Transformations

  • --rotation DEGREES: Rotate overlay (default: 0)
  • --skew-x DEGREES: Skew overlay horizontally (default: 0)
  • --skew-y DEGREES: Skew overlay vertically (default: 0)
  • --opacity PERCENT: Overlay opacity (default: 100)
  • --blur RADIUS: Blur overlay (default: 0)
  • --shadow RADIUS: Add shadow to overlay (default: 0)

Background Effects

  • --brightness PERCENT: Adjust brightness (default: 100)
  • --contrast PERCENT: Adjust contrast (default: 100)
  • --saturation PERCENT: Adjust saturation (default: 100)
  • --hue DEGREES: Shift hue (default: 0)
  • --gamma VALUE: Gamma correction (default: 1.0)
  • --vignette STRENGTH: Add vignette effect (default: 0)
  • --noise LEVEL: Add noise (default: 0)
  • --sharpen RADIUS: Sharpen image (default: 0)

Artistic Effects

  • --emboss RADIUS: Emboss effect (default: 0)
  • --sepia THRESHOLD: Sepia tone effect (default: 0)
  • --polaroid ANGLE: Polaroid effect (default: 0)
  • --sketch RADIUS: Sketch effect (default: 0)
  • --charcoal RADIUS: Charcoal effect (default: 0)
  • --oil-paint RADIUS: Oil painting effect (default: 0)
  • --edge-detect RADIUS: Edge detection (default: 0)
  • --solarize THRESHOLD: Solarization effect (default: 0)
  • --posterize LEVELS: Posterize effect (default: 0)

Distortion Effects

  • --wave-amplitude PIXELS: Wave distortion amplitude (default: 0)
  • --wave-length PIXELS: Wave distortion length (default: 0)
  • --swirl DEGREES: Swirl distortion (default: 0)
  • --implode AMOUNT: Implode distortion (default: 0)
  • --spread PIXELS: Spread pixels (default: 0)

Borders and Frames

  • --border-width PIXELS: Border width (default: 0)
  • --border-color COLOR: Border color (default: black)
  • --background COLOR: Background color
  • --matte-color COLOR: Matte color for transparent areas

Color Adjustments

  • --tint COLOR: Tint color overlay
  • --threshold PERCENT: Black/white threshold (default: 0)
  • --levels "black,gamma,white": Adjust levels
  • --colorspace SPACE: Convert colorspace
  • --modulate "brightness,saturation,hue": Modulate values
  • --channel-fx EXPRESSION: Channel effects
  • --color-matrix MATRIX: Apply color matrix

Geometry and Cropping

  • --crop GEOMETRY: Crop to geometry (WxH+X+Y)
  • --trim: Remove transparent/uniform borders
  • --chop GEOMETRY: Remove pixels from image
  • --splice GEOMETRY: Insert pixels into image
  • --extent GEOMETRY: Extend image to geometry
  • --liquid-rescale GEOMETRY: Content-aware resize

Transformations

  • --flop: Mirror horizontally
  • --flip: Mirror vertically
  • --transpose: Transpose (flip + 90° rotation)
  • --transverse: Transverse (flop + 90° rotation)
  • --roll GEOMETRY: Roll image pixels

Blur and Sharpen

  • --adaptive-blur RADIUS: Adaptive blur
  • --adaptive-sharpen RADIUS: Adaptive sharpen
  • --bilateral-blur GEOMETRY: Bilateral blur (edge-preserving)
  • --motion-blur GEOMETRY: Motion blur (angle x radius)
  • --radial-blur ANGLE: Radial blur (default: 0)
  • --selective-blur GEOMETRY: Selective blur
  • --unsharp GEOMETRY: Unsharp mask (radius x sigma+gain+threshold)

Advanced Options

  • --composite-method METHOD: Composite method (default: over)
  • --compression TYPE: Compression type (default: none)
  • --depth BITS: Color depth (default: 8)
  • --profile PATH: Apply ICC color profile
  • --strip-profiles: Strip all color profiles
  • --interlace TYPE: Interlacing (default: none)
  • --filter TYPE: Resize filter (default: lanczos)
  • --virtual-pixel TYPE: Virtual pixel method (default: edge)
  • --interpolate TYPE: Interpolation method (default: average)
  • --alpha-channel TYPE: Alpha channel handling (default: activate)

Annotation and Watermarks

  • --annotate TEXT: Add text annotation
  • --annotate-font FONT: Font for annotation
  • --annotate-size SIZE: Font size (default: 12)
  • --annotate-color COLOR: Font color (default: white)
  • --annotate-position POS: Text position (default: south)
  • --watermark FILE: Additional watermark image
  • --watermark-gravity POS: Watermark position (default: southeast)
  • --watermark-opacity PERCENT: Watermark opacity (default: 50)

Enhancement Options

  • --despeckle: Remove speckle noise
  • --enhance: Enhance image
  • --equalize: Histogram equalization
  • --normalize: Normalize contrast
  • --auto-level: Auto-adjust levels
  • --auto-gamma: Auto-adjust gamma
  • --linear-stretch "black,white": Linear stretch
  • --sigmoidal-contrast "contrast,midpoint": Sigmoidal contrast

Advanced Effects

  • --morphology "method:kernel": Morphological operations
  • --distort "method:args": Distortion operations
  • --fx EXPRESSION: Mathematical operations
  • --evaluate "operator:value": Evaluate mathematical expression
  • --function "name:parameters": Apply function

Utility Options

  • -h, --help: Show this help message
  • -v, --verbose: Enable verbose output
  • --version: Show script version
  • --list-formats: List supported image formats
  • --list-filters: List available resize filters
  • --list-composite-methods: List available composite methods
  • --dry-run: Show commands without executing them

Examples

  • Basic composition:
    obsidianwall input.jpg overlay.png output.png
  • Scale overlay, position it, and add a shadow:
    obsidianwall -s 50 --gravity northeast --shadow 10 input.jpg overlay.png
  • Apply sepia tone, vignette, and a gold border:
    obsidianwall --sepia 80 --vignette 30 --border-width 5 --border-color gold input.jpg
  • Apply wave distortion, swirl, and compose:
    obsidianwall --wave-amplitude 10 --wave-length 100 --swirl 45 input.jpg overlay.png
  • Adjust brightness, contrast, and saturation:
    obsidianwall --brightness 120 --contrast 110 --saturation 130 input.jpg overlay.png

License

This project is licensed under the MIT License.

About

ObsidianOS Wallpaper Compositor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages