Skip to content

Automatic nine-patch tool that crops central part of image (buttons, inputs, backgrounds)

License

Notifications You must be signed in to change notification settings

oleksii-zavrazhnyi/9patcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

9patcher

Automatic nine-patch tool that crops central part of image (buttons, inputs, backgrounds).

9patcher

Easy in use: central 2 pixels will be stretchable.

Written in bash. Tested only on OS X 10.8.4

If you can test it on different systems, please feedback me with results on [email protected]

Requirements

  • BASH
  • Standard UNIX tools: mktemp
  • ImageMagick: identify, convert and montage binaries

Installation

git clone [email protected]:TheMengzor/9patcher.git
cd 9patcher
chmod +x ./9patcher.sh
sudo ln 9pather.sh /usr/bin/9patcher

Usage

Patch single file

9patch file

Patch several files

9patch file1 file2 ... fileN

Patch files by the mask (in this case all .png files)

9patch *.png

Most useful! Patch all files which names starts with button_

9patch button_*

Skip 40 pixels on the left (see example image with facebook buttons). Note that 40 is just an example, you can use any number in -skip parameter

9patch -skip 40 ./[email protected]

About

Automatic nine-patch tool that crops central part of image (buttons, inputs, backgrounds)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages