sdsykes-fastimage_resize 1.1.2 → 1.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.
data/README.textile CHANGED
@@ -2,6 +2,12 @@ h1. FastImage Resize
2
2
 
3
3
  h4. FastImage Resize is an extremely light solution for resizing images in ruby by using libgd
4
4
 
5
+ FastImage Resize will resize gifs, jpegs, and png files.
6
+
7
+ It uses resampling to get good looking results.
8
+
9
+ And it doesn't rely on installing external heavy libraries such as RMagick (which relies on ImageMagick or GraphicsMagick) or ImageScience (which relies on FreeImage).
10
+
5
11
  h2. Examples
6
12
 
7
13
  <pre>
@@ -13,6 +19,45 @@ h2. Examples
13
19
  </pre>
14
20
  </code>
15
21
 
22
+ The file my.gif is created locally, containing the resized image.
23
+
24
+ h2. Installation
25
+
26
+ First check the requirements section below.
27
+
28
+ h4. Gem
29
+
30
+ <pre>
31
+ <code>
32
+ sudo gem install sdsykes-fastimage_resize -s http://gems.github.com
33
+ </pre>
34
+ </code>
35
+
36
+ h4. Rails
37
+
38
+ Install the gem as above, and configure it in your environment.rb file as below:
39
+ <pre>
40
+ <code>
41
+ ...
42
+ Rails::Initializer.run do |config|
43
+ ...
44
+ config.gem "sdsykes-fastimage_resize", :lib=>"fastimage_resize"
45
+ ...
46
+ end
47
+ ...
48
+ </code>
49
+ </pre>
50
+
51
+ You may also need this in your environment.rb so that the rails process puts the compiled C code in a place it can access:
52
+
53
+ <pre>
54
+ <code>
55
+ ENV['INLINEDIR'] = RAILS_ROOT + "/tmp" # for RubyInline
56
+ </code>
57
+ </pre>
58
+
59
+ Then you're off - just use FastImage.resize() in your code as in the examples.
60
+
16
61
  h2. Requirements
17
62
 
18
63
  * RubyInline
@@ -37,6 +82,19 @@ See "http://www.libgd.org/":http://www.libgd.org/
37
82
 
38
83
  Libgd is commonly available on most unix platforms, including OSX.
39
84
 
85
+ h2. Documentation
86
+
87
+ "http://rdoc.info/projects/sdsykes/fastimage_resize":http://rdoc.info/projects/sdsykes/fastimage_resize
88
+
89
+ h2. Caveats
90
+
91
+ Because of the way that libgd works, gif files that have transparency may not always come through with the transparency perfectly retained.
92
+
93
+
94
+ h2. Tests
95
+
96
+ You'll need to 'sudo gem install fakeweb' to be able to run the tests
97
+
40
98
  h2. References
41
99
 
42
100
  * "http://blog.new-bamboo.co.uk/2007/12/3/super-f-simple-resizing":http://blog.new-bamboo.co.uk/2007/12/3/super-f-simple-resizing
data/Rakefile CHANGED
@@ -7,9 +7,12 @@ begin
7
7
  s.summary = "FastImage Resize - Image resizing fast and simple"
8
8
  s.email = "sdsykes@gmail.com"
9
9
  s.homepage = "http://github.com/sdsykes/fastimage_resize"
10
- s.description = "FastImage Rssize is an extremely light solution for resizing images in ruby by using libgd."
10
+ s.description = "FastImage Resize is an extremely light solution for resizing images in ruby by using libgd."
11
11
  s.authors = ["Stephen Sykes"]
12
12
  s.files = FileList["[A-Z]*", "{lib,test}/**/*"]
13
+ s.requirements << 'libgd, see www.libgd.org'
14
+ s.add_dependency('RubyInline', '>= 3.8.2')
15
+ s.add_dependency('sdsykes-fastimage', '>= 1.2.0')
13
16
  end
14
17
  rescue LoadError
15
18
  puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
+ :major: 1
3
+ :minor: 2
2
4
  :patch: 0
3
- :major: 0
4
- :minor: 1
@@ -32,7 +32,7 @@ require 'tempfile'
32
32
  require 'fastimage'
33
33
 
34
34
  class FastImage
35
- SUPPORTED_FORMATS = [:jpg, :png, :gif]
35
+ SUPPORTED_FORMATS = [:jpeg, :png, :gif]
36
36
 
37
37
  class FormatNotSupported < FastImageException # :nodoc:
38
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdsykes-fastimage_resize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Sykes
@@ -9,11 +9,30 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-07 00:00:00 -07:00
12
+ date: 2009-09-16 00:00:00 -07:00
13
13
  default_executable:
14
- dependencies: []
15
-
16
- description: FastImageResize is an extremely light solution for resizing images in ruby by using libgd.
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: RubyInline
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 3.8.2
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: sdsykes-fastimage
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.0
34
+ version:
35
+ description: FastImage Resize is an extremely light solution for resizing images in ruby by using libgd.
17
36
  email: sdsykes@gmail.com
18
37
  executables: []
19
38
 
@@ -29,8 +48,9 @@ files:
29
48
  - VERSION.yml
30
49
  - lib/fastimage_resize.rb
31
50
  - test/test.rb
32
- has_rdoc: true
51
+ has_rdoc: false
33
52
  homepage: http://github.com/sdsykes/fastimage_resize
53
+ licenses:
34
54
  post_install_message:
35
55
  rdoc_options:
36
56
  - --inline-source
@@ -49,12 +69,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
69
  - !ruby/object:Gem::Version
50
70
  version: "0"
51
71
  version:
52
- requirements: []
53
-
72
+ requirements:
73
+ - libgd, see www.libgd.org
54
74
  rubyforge_project:
55
- rubygems_version: 1.2.0
75
+ rubygems_version: 1.3.5
56
76
  signing_key:
57
- specification_version: 2
77
+ specification_version: 3
58
78
  summary: FastImage Resize - Image resizing fast and simple
59
79
  test_files: []
60
80