photile 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +37 -25
  2. data/photile.gemspec +1 -1
  3. metadata +4 -4
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # photile**
1
+ # photile
2
2
 
3
3
  * * *
4
4
  *A ruby gem/library to chop a photo into tiles, watermark them, etc*
@@ -8,32 +8,33 @@
8
8
 
9
9
  One scenario where this is really useful is image processing for product images. Most product images are shot on white background, which means that there is a big opportunity to reduce image size and improve rendering speed on the web page. Here's what you can do with `photile`: `basic quality reduction` → `watermark your product images` → `break it up into tiles (certain tiles will be all white)` → `compress individual tiles`.
10
10
 
11
- ### Functions
11
+ ### Installation & Dependencies
12
12
 
13
- * Quality manipulation
14
- * Loss-less compression
15
- * Watermarking
16
- * Tiling
17
-
18
- ### Piping
19
-
20
- The four main functions of `photile` can be used in all combinations possible because of their 'piping' properties (i.e., the Builder Pattern). Each function takes in an image and spits out an image or an array of images. When an array of images is returned any function thereafter is applied to all items in the array. When piping functions the order is relevant as the output of a function becomes the input of another. For example: `tile` → `watermark` (tiles images and then applies a watermark to the smaller, chopped images) is not the same as `watermark` → `tile` (watermarks an image and then creates tiles).
21
-
22
- Here are the piping scenarios available
13
+ * **Imagemagick** - Follow the installation instructions [here](http://imagemagick.org) (on Linux you can install it using: `sudo apt-get install imagemagick imagemagick-common`).
14
+ * **Jpegtran** - Follow the installation instructions [here](http://jpegclub.org/jpegtran) (on Linux you can install it using: `sudo apt-get install libjpeg-turbo-progs`).
23
15
 
24
- * `IMAGE` → `Quality Modifier` → `IMAGE`
25
- * `IMAGE` → `Compressor` → `IMAGE`
26
- * `IMAGE` + `WATERMARK IMAGE` → `Watermarker` → `IMAGE`
27
- * `IMAGE` → `Tiler` → `[IMAGE...IMAGE]`
16
+ ```bash
17
+ # https://rubygems.org/gems/gem
18
+ $ photile install photile
19
+ ```
28
20
 
29
21
  ### Examples
30
22
 
31
23
  ```bash
24
+ # Usage
25
+ $ photile
26
+ Usage: photile [options] infile outfile
27
+ -q, --quality VALUE Modify image quality
28
+ -c, --compress Loss-less compress image
29
+ -w, --watermark FILE Watermark with given file
30
+ -t, --tile WIDTHxHEIGHT Tile to the given dimensions
31
+ -h, --help Display options help
32
+
32
33
  # Basic Examples
33
34
  $ photile -quality 80 image-in image-out
34
35
  $ photile -compress image-in image-out
35
36
  $ photile -watermark image-in image-watermark image-out
36
- $ photile -tile WIDTHxHEIGHT image-in [image-out-0...image-out-n]
37
+ $ photile -tile WIDTHxHEIGHT image-in image-out
37
38
 
38
39
  # Advanced Examples
39
40
 
@@ -44,19 +45,30 @@ $ photile -quality 80 -compress image-in image-out
44
45
  $ photile -watermark -tile WIDTHxHEIGHT image-in image-watermark image-out
45
46
 
46
47
  # 3. Reduce quality of 'image-in', then compress it and watermark it with 'image-watermark'. Finally, tile the watermarked image to produce '[image-out-0...image-out-n]'
47
- $ photile -quality 80 -compress -watermark -tile WIDTHxHEIGHT image-in image-watermark [image-out-0...image-out-n]
48
+ $ photile -quality 80 -compress -watermark -tile WIDTHxHEIGHT image-in image-watermark image-out
48
49
  ```
49
50
 
50
- ### Dependencies
51
+ ### Features
51
52
 
52
- * **Imagemagick** - Follow the installation instructions [here](http://imagemagick.org) (on Linux you can install it using: `sudo apt-get install imagemagick imagemagick-common`).
53
- * **Jpegtran** - Follow the installation instructions [here](http://jpegclub.org/jpegtran) (on Linux you can install it using: `sudo apt-get install libjpeg-turbo-progs`).
53
+ * Quality manipulation
54
+ * Loss-less compression
55
+ * Watermarking
56
+ * Tiling
54
57
 
55
- ### More
58
+ ### Piping
59
+
60
+ The four main functions of `photile` can be used in all combinations possible because of their 'piping' properties (i.e., the Builder Pattern). Each function takes in an image and spits out an image or an array of images. When an array of images is returned any function thereafter is applied to all items in the array. When piping functions the order is relevant as the output of a function becomes the input of another. For example: `tile` → `watermark` (tiles images and then applies a watermark to the smaller, chopped images) is not the same as `watermark` → `tile` (watermarks an image and then creates tiles).
61
+
62
+ Here are the piping scenarios available
56
63
 
57
- Photile uses the amazing [Imagemagick](http://www.imagemagick.org/script/index.php) and [Jpegtran](http://jpegclub.org/jpegtran/) libraries. Imagemagick provides quality, watermarking and tiling properties. Jpegtran provides the loss-less compression. In other words, `photile` is just a layer on top of existing libraries to make certain image processing tasks dead simple. Additionally since `photile` is a gem it can be used directly in Rails to create dynamic workflows.
64
+ * `IMAGE` `Quality Modifier` `IMAGE`
65
+ * `IMAGE` → `Compressor` → `IMAGE`
66
+ * `IMAGE` + `WATERMARK IMAGE` → `Watermarker` → `IMAGE`
67
+ * `IMAGE` → `Tiler` → `[IMAGE...IMAGE]`
68
+
69
+ ### More
58
70
 
59
- ** `photile` is in a pre-release α state at the moment.
71
+ Photile uses the amazing [Imagemagick](http://www.imagemagick.org/script/index.php) 6.6.9-7 and [Jpegtran](http://jpegclub.org/jpegtran/) 1.2.0 libraries. Imagemagick provides quality, watermarking and tiling properties. Jpegtran provides the loss-less compression. In other words, `photile` is just a layer on top of existing libraries to make certain image processing tasks dead simple. Additionally since `photile` is a gem it can be used directly in Rails to create dynamic workflows.
60
72
 
61
73
  * * *
62
- Copyright (c) 2012 Nitin Dhar. See [MIT-LICENSE](MIT-LICENSE) for details.
74
+ Copyright (c) 2013 Nitin Dhar. See [MIT-LICENSE](MIT-LICENSE) for details.
data/photile.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.bindir = 'bin'
12
12
  s.license = 'MIT'
13
13
  s.homepage = 'https://github.com/nitindhar7/photile'
14
- s.add_development_dependency 'rake', ['>= 0.9.2']
14
+ s.add_development_dependency 'rake', ['>= 0.8.7']
15
15
  s.required_ruby_version = '>= 1.8.7'
16
16
  s.requirements << 'imagemagick' << 'imagemagick-common' << 'libjpeg-turbo-progs'
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-15 00:00:00.000000000 Z
12
+ date: 2013-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 0.9.2
21
+ version: 0.8.7
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ! '>='
28
28
  - !ruby/object:Gem::Version
29
- version: 0.9.2
29
+ version: 0.8.7
30
30
  description: Photile is just a layer on top of Imagemagick and Jpegtran to make certain
31
31
  image processing tasks dead simple.
32
32
  email: nitindhar7@yahoo.com