miso 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. data/Rakefile +1 -1
  2. data/TODO +6 -2
  3. data/VERSION +1 -1
  4. data/lib/miso.rb +9 -0
  5. data/lib/miso/image.rb +8 -0
  6. data/lib/miso/processor.rb +10 -3
  7. data/lib/miso/processor/core_image.rb +83 -8
  8. data/miso.gemspec +11 -26
  9. data/spec/api/factory_spec.rb +1 -1
  10. data/spec/api/image_spec.rb +19 -9
  11. data/spec/api/processor/core_image_spec.rb +29 -0
  12. data/spec/api/processor_spec.rb +10 -2
  13. data/spec/functional/processor/core_image_spec.rb +43 -0
  14. data/spec/functional/processor_spec.rb +14 -0
  15. data/spec/start.rb +12 -0
  16. metadata +8 -24
  17. data/html/classes/Miso.html +0 -133
  18. data/html/classes/Miso/Factory.html +0 -278
  19. data/html/classes/Miso/Image.html +0 -394
  20. data/html/classes/Miso/Processor.html +0 -379
  21. data/html/classes/Miso/Processor/CoreImage.html +0 -246
  22. data/html/classes/Miso/Processor/ImageMagick.html +0 -345
  23. data/html/classes/Miso/Processor/NotImplementedError.html +0 -111
  24. data/html/created.rid +0 -1
  25. data/html/files/LICENSE.html +0 -133
  26. data/html/files/README.html +0 -156
  27. data/html/files/lib/miso/factory_rb.html +0 -101
  28. data/html/files/lib/miso/image_rb.html +0 -101
  29. data/html/files/lib/miso/processor/core_image_rb.html +0 -108
  30. data/html/files/lib/miso/processor/image_magick_rb.html +0 -110
  31. data/html/files/lib/miso/processor_rb.html +0 -101
  32. data/html/files/lib/miso_rb.html +0 -101
  33. data/html/fr_class_index.html +0 -33
  34. data/html/fr_file_index.html +0 -34
  35. data/html/fr_method_index.html +0 -62
  36. data/html/index.html +0 -24
  37. data/html/rdoc-style.css +0 -208
  38. data/pkg/miso-0.1.0.gem +0 -0
@@ -1,111 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>Class: Miso::Processor::NotImplementedError</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="classHeader">
50
- <table class="header-table">
51
- <tr class="top-aligned-row">
52
- <td><strong>Class</strong></td>
53
- <td class="class-name-in-header">Miso::Processor::NotImplementedError</td>
54
- </tr>
55
- <tr class="top-aligned-row">
56
- <td><strong>In:</strong></td>
57
- <td>
58
- <a href="../../../files/lib/miso/processor_rb.html">
59
- lib/miso/processor.rb
60
- </a>
61
- <br />
62
- </td>
63
- </tr>
64
-
65
- <tr class="top-aligned-row">
66
- <td><strong>Parent:</strong></td>
67
- <td>
68
- StandardError
69
- </td>
70
- </tr>
71
- </table>
72
- </div>
73
- <!-- banner header -->
74
-
75
- <div id="bodyContent">
76
-
77
-
78
-
79
- <div id="contextContent">
80
-
81
-
82
-
83
- </div>
84
-
85
-
86
- </div>
87
-
88
-
89
- <!-- if includes -->
90
-
91
- <div id="section">
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
- <!-- if method_list -->
101
-
102
-
103
- </div>
104
-
105
-
106
- <div id="validator-badges">
107
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
108
- </div>
109
-
110
- </body>
111
- </html>
data/html/created.rid DELETED
@@ -1 +0,0 @@
1
- Tue, 20 Oct 2009 17:19:55 +0200
@@ -1,133 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: LICENSE</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>LICENSE</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>LICENSE
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Tue Oct 20 14:18:36 +0200 2009</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <p>
73
- Copyright (c) 2009
74
- </p>
75
- <pre>
76
- Manfred Stienstra, Fingertips &lt;manfred@fngtps.com&gt;
77
- Eloy Duran, Fingertips &lt;eloy@fngtps.com&gt;
78
- </pre>
79
- <p>
80
- Permission is hereby granted, free of charge, to any person obtaining a
81
- copy of this software and associated documentation files (the
82
- &quot;Software&quot;), to deal in the Software without restriction,
83
- including without limitation the rights to use, copy, modify, merge,
84
- publish, distribute, sublicense, and/or sell copies of the Software, and to
85
- permit persons to whom the Software is furnished to do so, subject to the
86
- following conditions:
87
- </p>
88
- <p>
89
- The above copyright notice and this permission notice shall be included in
90
- all copies or substantial portions of the Software.
91
- </p>
92
- <p>
93
- THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
94
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
95
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
96
- NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
97
- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
98
- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
99
- USE OR OTHER DEALINGS IN THE SOFTWARE.
100
- </p>
101
-
102
- </div>
103
-
104
-
105
- </div>
106
-
107
-
108
- </div>
109
-
110
-
111
- <!-- if includes -->
112
-
113
- <div id="section">
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
- <!-- if method_list -->
123
-
124
-
125
- </div>
126
-
127
-
128
- <div id="validator-badges">
129
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
130
- </div>
131
-
132
- </body>
133
- </html>
@@ -1,156 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: README</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>README</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>README
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Tue Oct 20 17:19:38 +0200 2009</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
- <div id="description">
72
- <p>
73
- (&#8230;) <a href="../classes/Miso.html">Miso</a>
74
- </p>
75
- <p>
76
- <a href="../classes/Miso.html">Miso</a> is a unified API for simple image
77
- operations commonly used on the web. It provides backends for often used
78
- graphic libraries, but it&#8216;s also pretty easy to plug in your own
79
- backend.
80
- </p>
81
- <p>
82
- A unified API is helpful when you run your code on a number of different
83
- boxes and architectures. For instance, you could develop your web
84
- application on your Mac with the Core Image backend [1] and deploy to your
85
- Linux server with an ImageMagick backend. You could even have the API talk
86
- to your custom distributed image processing backend.
87
- </p>
88
- <p>
89
- <a href="../classes/Miso.html">Miso</a> can be used in three different
90
- ways, each useful in different situations.
91
- </p>
92
- <pre>
93
- 1. For the quick crop
94
-
95
- Miso::Image.crop('input.jpg', 'output.jpg', 120, 100)
96
-
97
- 2. For the elaborate business logic
98
-
99
- @image = Miso::Image.new('input.jpg')
100
- @image.crop(120, 100) if options[:crop]
101
- @image.fit(120, 100) if options[:fit]
102
- @image.write('output.jpg')
103
-
104
- 3. As an option
105
-
106
- class Attachment
107
- has_variant :avatar,
108
- :processor =&gt; Miso::Image.factory.crop(120, 100).fit(60, 40)
109
- end
110
-
111
- Which works like this;
112
-
113
- factory = Miso::Image.factory.crop(123, 456)
114
- factory.apply('input.jpg', 'output.jpg')
115
- </pre>
116
- <p>
117
- Have fun with <a href="../classes/Miso.html">Miso</a>!
118
- </p>
119
- <dl>
120
- <dt>1</dt><dd>Note how that means you will never have to install ImageMagick again (;
121
-
122
- </dd>
123
- </dl>
124
-
125
- </div>
126
-
127
-
128
- </div>
129
-
130
-
131
- </div>
132
-
133
-
134
- <!-- if includes -->
135
-
136
- <div id="section">
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
- <!-- if method_list -->
146
-
147
-
148
- </div>
149
-
150
-
151
- <div id="validator-badges">
152
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
153
- </div>
154
-
155
- </body>
156
- </html>
@@ -1,101 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html
3
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
-
6
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
- <head>
8
- <title>File: factory.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
- <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
- <script type="text/javascript">
13
- // <![CDATA[
14
-
15
- function popupCode( url ) {
16
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
- }
18
-
19
- function toggleCode( id ) {
20
- if ( document.getElementById )
21
- elem = document.getElementById( id );
22
- else if ( document.all )
23
- elem = eval( "document.all." + id );
24
- else
25
- return false;
26
-
27
- elemStyle = elem.style;
28
-
29
- if ( elemStyle.display != "block" ) {
30
- elemStyle.display = "block"
31
- } else {
32
- elemStyle.display = "none"
33
- }
34
-
35
- return true;
36
- }
37
-
38
- // Make codeblocks hidden by default
39
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
-
41
- // ]]>
42
- </script>
43
-
44
- </head>
45
- <body>
46
-
47
-
48
-
49
- <div id="fileHeader">
50
- <h1>factory.rb</h1>
51
- <table class="header-table">
52
- <tr class="top-aligned-row">
53
- <td><strong>Path:</strong></td>
54
- <td>lib/miso/factory.rb
55
- </td>
56
- </tr>
57
- <tr class="top-aligned-row">
58
- <td><strong>Last Update:</strong></td>
59
- <td>Tue Oct 20 16:55:39 +0200 2009</td>
60
- </tr>
61
- </table>
62
- </div>
63
- <!-- banner header -->
64
-
65
- <div id="bodyContent">
66
-
67
-
68
-
69
- <div id="contextContent">
70
-
71
-
72
-
73
- </div>
74
-
75
-
76
- </div>
77
-
78
-
79
- <!-- if includes -->
80
-
81
- <div id="section">
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
- <!-- if method_list -->
91
-
92
-
93
- </div>
94
-
95
-
96
- <div id="validator-badges">
97
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
98
- </div>
99
-
100
- </body>
101
- </html>