vips-thumbnail 1.0.2 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ed23c230e313d3d7dc8e26e6c9c12b471743fa27
4
- data.tar.gz: ad61217ca5757f059b1d8b49add28c2ea094da05
3
+ metadata.gz: ccf3f508ee8bc738617a58479d9266e4fc89689f
4
+ data.tar.gz: 66fed5439017df61d03b82025db40926af4799fc
5
5
  SHA512:
6
- metadata.gz: bd82792527b7b049c500f2df450268cce9d74faf76769fcd4672dde19e38b3b064a77860e78d42b80d6a9e714085ac04e73e16608064f19a6574a6b1d370724e
7
- data.tar.gz: 7d2c01acee8193c53de1ae6bfb177c626d40b92e7f31a0d4fd7bb489d7e9084b5ce64e30929c3e44fcc4f2b8f0ca4cf1a84bd50db331af599e6f089f6d969ba8
6
+ metadata.gz: c1c4863fb4c6829c9e0f541c524aac46db799ba31d8aa02e36d39e3b6cebe6f587edab25d033e4255b61ce043280023e6a53c0188b237f1c335e996842099752
7
+ data.tar.gz: f5cff9ad8a3ab9f1cfade7ca859285f68fb62219653178db374e77748fa8cc3569508a01e2dbab897cbce4ff4cdd5b60d8ab17b0ff9129700ccbbe080a495b9d
data/README.md CHANGED
@@ -22,6 +22,10 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install vips-thumbnail
24
24
 
25
+ ### Minimum Version
26
+
27
+ `libvips` has some [integer truncation issues](https://github.com/jcupitt/ruby-vips/issues/82) in versions < 8.4, so you *must* use a release >= 8.4 otherwise you may experience problems with `resize_to_fill`.
28
+
25
29
  ## Usage
26
30
 
27
31
  It's super easy:
@@ -23,16 +23,22 @@ require 'vips'
23
23
  module Vips
24
24
  module Thumbnail
25
25
  class Resizer
26
- def initialize(input_path)
26
+ def initialize(input_path, **options)
27
27
  @input_path = input_path
28
+ @options = options
28
29
  @input_image = nil
29
30
  end
30
31
 
31
32
  attr :input_path
33
+ attr :options
34
+
35
+ def flush!
36
+ @input_image = nil
37
+ end
32
38
 
33
39
  def input_image
34
40
  unless @input_image
35
- image = Vips::Image.new_from_file(@input_path)
41
+ image = Vips::Image.new_from_file(@input_path, **@options)
36
42
  @input_image = image.autorot
37
43
  end
38
44
 
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Vips
22
22
  module Thumbnail
23
- VERSION = "1.0.2"
23
+ VERSION = "1.1.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vips-thumbnail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-26 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-vips