dragonfly_libvips 2.2.0 → 2.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5550340dee7a433f18f190dce904f2fe02caa339677626503f05d408f9e21cd5
4
- data.tar.gz: 2b1055e2d247034322a5a6113a7af655d7762e83f4fb22525c26578db14c65a7
3
+ metadata.gz: e4b64d88420b228e976b7c0d5792e803ea538862d8b6fa4ad6cd48351f88c7e6
4
+ data.tar.gz: 827caa0406199bc7ae5911346a378762e3a293c1be3481a69461ea5b5109cd13
5
5
  SHA512:
6
- metadata.gz: 6dd9e3e8cba7f60fd0eb3ee480f6362f88d1e3270d93ed2503b6ae69a4cb954a4f7994dd9fe1d7c24a7b0266361ea1c930bb2d22fa94ccf5f095b2ef2aabc897
7
- data.tar.gz: c56578890115a8c235458b7893bcc07757c0c5422d1b73d006904032924b6fa2f450f8c2644038ac023742430ca37b9452271d405437113bfe8c96bece9ce55c
6
+ metadata.gz: 714d74358f8d176013dc78b7c89fd25e328b3d94816ad0acc82c86ee84110884a4713f8312802de727b9ecc62498976a141751683bf2157e2b0ca27bc7d94367
7
+ data.tar.gz: 6a2fe288e736019d108262b17fd0bcae88cfc4d7428508042309f0204adef8e157ed7b4dadde3c32aff42f9d99a8337d961e6a697ec280d9986d747aef73478d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 2.3.0
4
+
5
+ * add support for progressive JPEGs
6
+
3
7
  ## 2.2.0
4
8
 
5
9
  * add `SUPPORTED_FORMATS` and `SUPPORTED_OUTPUT_FORMATS` and raise errors when formats are not matching
data/README.md CHANGED
@@ -105,6 +105,7 @@ All processors support `input_options` and `output_options` for passing addition
105
105
 
106
106
  ```ruby
107
107
  image.encode('jpg', output_options: { Q: 50 })
108
+ image.encode('jpg', output_options: { interlace: true }) # use interlace to generate a progressive jpg
108
109
  pdf.encode('jpg', input_options: { page: 0, dpi: 600 })
109
110
  ```
110
111
 
@@ -124,6 +125,7 @@ image.width # => 280
124
125
  image.height # => 355
125
126
  image.xres # => 72.0
126
127
  image.yres # => 72.0
128
+ image.progressive # => true
127
129
  image.aspect_ratio # => 0.788732394366197
128
130
  image.portrait? # => true
129
131
  image.landscape? # => false
@@ -25,7 +25,8 @@ module DragonflyLibvips
25
25
  'width' => width,
26
26
  'height' => height,
27
27
  'xres' => xres,
28
- 'yres' => yres
28
+ 'yres' => yres,
29
+ 'progressive' => (content.mime_type == 'image/jpeg' && img.get('jpeg-multiscan') != 0)
29
30
  }
30
31
  end
31
32
  end
@@ -21,8 +21,8 @@ module DragonflyLibvips
21
21
  input_options['autorotate'] = input_options.fetch('autorotate', true) if content.mime_type == 'image/jpeg'
22
22
 
23
23
  if content.mime_type == 'application/pdf'
24
- input_options['dpi'] = input_options.fetch('dpi', DPI) if content.mime_type == 'application/pdf'
25
- input_options['page'] = input_options.fetch('page', 0) if content.mime_type == 'application/pdf'
24
+ input_options['dpi'] = input_options.fetch('dpi', DPI)
25
+ input_options['page'] = input_options.fetch('page', 0)
26
26
  else
27
27
  input_options.delete('page')
28
28
  input_options.delete('dpi')
@@ -1,3 +1,3 @@
1
1
  module DragonflyLibvips
2
- VERSION = '2.2.0'.freeze
2
+ VERSION = '2.3.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly_libvips
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-14 00:00:00.000000000 Z
11
+ date: 2018-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dragonfly