ImageResize 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -2
- data/README.rdoc +2 -2
- data/java/ImageResize.jar +0 -0
- data/lib/ImageResize.rb +1 -1
- data/lib/ImageResize/Image.rb +4 -2
- data/samples/resize.rb +1 -2
- metadata +4 -4
data/History.txt
CHANGED
data/README.rdoc
CHANGED
@@ -11,12 +11,12 @@ simple image resize library without external program.
|
|
11
11
|
require 'rubygems'
|
12
12
|
require 'ImageResize'
|
13
13
|
|
14
|
+
# input_image_filename, output_image_filename, max_width, max_height
|
14
15
|
Image.resize('big.jpg', 'small.jpg', 40, 40)
|
15
16
|
|
16
|
-
|
17
17
|
== REQUIREMENTS:
|
18
18
|
|
19
|
-
* Java
|
19
|
+
* Java 1.5 or higher
|
20
20
|
|
21
21
|
== INSTALL:
|
22
22
|
|
data/java/ImageResize.jar
CHANGED
Binary file
|
data/lib/ImageResize.rb
CHANGED
data/lib/ImageResize/Image.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module Image
|
2
2
|
|
3
|
-
|
4
3
|
def Image.resize(img_in, img_out, width, height)
|
5
|
-
|
4
|
+
jar_path = File.expand_path(File.dirname(__FILE__)).split(/\//)
|
5
|
+
jar_path.pop
|
6
|
+
jar_path.pop
|
7
|
+
resizer = "#{jar_path.join('/')}/java/ImageResize.jar"
|
6
8
|
puts `java -jar #{resizer} #{img_in} #{img_out} #{width} #{height}`
|
7
9
|
end
|
8
10
|
|
data/samples/resize.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ImageResize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sho Hashimoto
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-27 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|