Project

pix_scale

0.0
No commit activity in last 3 years
No release in over 3 years
A command line tool for scale of pix.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

pix_scale

A command line tool for scale of pix.

Requirements

Installation

gem install pix_scale

Official supported format

  • PNG
  • JPEG

Usage

rate

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo.png

% pix_scale foo.png 0.5

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo.png
-rw-rw-r-- 1 you you 18539 2013-06-27 20:01 foo-0.5.png

width/height

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo.png

% pix_scale foo.png 200_200  # width_height

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo.png
-rw-rw-r-- 1 you you 18539 2013-06-27 20:01 foo-200_200.png

width only (Height maintains a ratio.)

% pix_scale foo.png 200

height only (Width maintains a ratio.)

% pix_scale foo.png _200

multiple files

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo.png
-rw-rw-r-- 1 you you 31438 2013-06-27 20:00 bar.png

% pix_scale *.png 0.5

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo.png
-rw-rw-r-- 1 you you 18539 2013-06-27 20:01 foo-0.5.png
-rw-rw-r-- 1 you you 31438 2013-06-27 20:00 bar.png
-rw-rw-r-- 1 you you 16462 2013-06-27 20:01 bar-0.5.png

specify type

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo

% pix_scale -t png foo 0.5

% ls -l
-rw-rw-r-- 1 you you 46643 2013-06-27 20:00 foo
-rw-rw-r-- 1 you you 18539 2013-06-27 20:01 foo-0.5.png

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request