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 CHANGED
@@ -1,4 +1,6 @@
1
+ === 0.0.2 2010-06-27
2
+ * fix jarfile path
3
+
1
4
  === 0.0.1 2010-06-26
2
5
 
3
- * 1 major enhancement:
4
- * Initial release
6
+ * Image.resize
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 (1.5 or higher)
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
@@ -4,5 +4,5 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'ImageResize/Image'
5
5
 
6
6
  module ImageResize
7
- VERSION = '0.0.1'
7
+ VERSION = '0.0.2'
8
8
  end
@@ -1,8 +1,10 @@
1
1
  module Image
2
2
 
3
-
4
3
  def Image.resize(img_in, img_out, width, height)
5
- resizer = File.dirname(__FILE__) + '/../../java/ImageResize.jar'
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
@@ -1,8 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
3
  require 'ImageResize'
4
+ #require '../lib/ImageResize'
4
5
 
5
6
  Image.resize('shokai-big.jpg', '~/shokai-small.jpg', 40, 40)
6
7
 
7
-
8
-
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: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
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-26 00:00:00 +09:00
18
+ date: 2010-06-27 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency