morandi 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -1
- data/README.md +3 -1
- data/lib/morandi/image_processor.rb +2 -2
- data/lib/morandi/utils.rb +6 -1
- data/lib/morandi/version.rb +1 -1
- data/morandi.gemspec +1 -1
- data/spec/morandi_spec.rb +2 -2
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8205b8cb27b5245b443dfa17aa4e33f65f40a7d7f006013da2ccab43cc651fa3
|
4
|
+
data.tar.gz: d58dc45a2304aaa7eb513e54a6b4adaff390bed0c246346f8872a3da60c4cf68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f323e68d2c6d55c684847a34e71e4e04fa895c97669d6b8c2fcc4ee417fc919bf6a9c15eadb9538485a8875f2989089181b70fa4a04ce750f781671443e98e5b
|
7
|
+
data.tar.gz: 5a4615e4f5502fa8181e26c2f343b87276433a9e4bcc73720a55d2fd1eddbbfdc2063f7f274085dccada0b5129ed2d187be17f2ebd85a6cc7673b56ef195f1eb
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
-
## Last updated
|
7
|
+
## Last updated 26.06.2019
|
8
|
+
|
9
|
+
## [0.11.3] 26.06.2019
|
10
|
+
### Fixed
|
11
|
+
- Compatability with gdk_pixbuf v3.0.9+ [TECH-9065]
|
8
12
|
|
9
13
|
## [0.11.2] 21.02.2019
|
10
14
|
### Added
|
data/README.md
CHANGED
@@ -5,6 +5,8 @@ morandi-js.
|
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
8
|
+
Install `liblcms2-utils` to provide the `jpgicc` command used by `Morandi::ProfiledPixbuf`
|
9
|
+
|
8
10
|
Add this line to your application's Gemfile:
|
9
11
|
|
10
12
|
gem 'morandi'
|
@@ -38,7 +40,7 @@ crop | Array[Integer,Integer,Integer,Integer] | Crop image
|
|
38
40
|
fx | String greyscale,sepia,bluetone | Apply colour filters
|
39
41
|
border-style | String square,retro | Set border style
|
40
42
|
background-style | String retro,black,white | Set border colour
|
41
|
-
quality |
|
43
|
+
quality | String '1'..'100' | Set JPG compression value, defaults to 97%
|
42
44
|
|
43
45
|
## Contributing
|
44
46
|
|
@@ -72,8 +72,8 @@ class Morandi::ImageProcessor
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def write_to_jpeg(fn, quality = nil)
|
75
|
-
quality ||= options.fetch('quality', 97)
|
76
|
-
@pb.save(fn, 'jpeg', quality: quality)
|
75
|
+
quality ||= options.fetch('quality', '97')
|
76
|
+
@pb.save(fn, 'jpeg', quality: quality.to_s)
|
77
77
|
end
|
78
78
|
|
79
79
|
protected
|
data/lib/morandi/utils.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'gdk_pixbuf2'
|
2
|
+
|
1
3
|
module Morandi
|
2
4
|
module Utils
|
3
5
|
module_function
|
@@ -97,6 +99,10 @@ module Morandi
|
|
97
99
|
end
|
98
100
|
|
99
101
|
class Gdk::Pixbuf
|
102
|
+
unless defined?(::Gdk::Pixbuf::InterpType)
|
103
|
+
InterpType = GdkPixbuf::InterpType
|
104
|
+
end
|
105
|
+
|
100
106
|
def scale_max(max_size, interp = Gdk::Pixbuf::InterpType::BILINEAR, max_scale = 1.0)
|
101
107
|
mul = (max_size / [width,height].max.to_f)
|
102
108
|
mul = [max_scale = 1.0,mul].min
|
@@ -114,4 +120,3 @@ class Cairo::ImageSurface
|
|
114
120
|
loader.pixbuf
|
115
121
|
end
|
116
122
|
end
|
117
|
-
|
data/lib/morandi/version.rb
CHANGED
data/morandi.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["git@intersect-uk.co.uk"]
|
11
11
|
spec.summary = %q{Simple Image Edits}
|
12
12
|
spec.description = %q{Apply simple edits to images}
|
13
|
-
spec.homepage = "
|
13
|
+
spec.homepage = ""
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/spec/morandi_spec.rb
CHANGED
@@ -138,8 +138,8 @@ RSpec.describe Morandi, "#process" do
|
|
138
138
|
|
139
139
|
# Sort the output files' sizes and expect them to match to quality order
|
140
140
|
it "creates files of increasing size" do
|
141
|
-
|
142
|
-
|
141
|
+
created_file_sizes = [default_of_97_quality, max_quality_file_size, quality_of_40_by_options_args].sort
|
142
|
+
expect(created_file_sizes).to eq([quality_of_40_by_options_args, default_of_97_quality, max_quality_file_size])
|
143
143
|
end
|
144
144
|
end
|
145
145
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morandi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- |+
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-
|
14
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: gtk2
|
@@ -178,7 +178,7 @@ files:
|
|
178
178
|
- sample/sample.jpg
|
179
179
|
- spec/morandi_spec.rb
|
180
180
|
- spec/spec_helper.rb
|
181
|
-
homepage:
|
181
|
+
homepage: ''
|
182
182
|
licenses:
|
183
183
|
- MIT
|
184
184
|
metadata: {}
|
@@ -197,8 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
requirements: []
|
200
|
-
|
201
|
-
rubygems_version: 2.6.10
|
200
|
+
rubygems_version: 3.0.1
|
202
201
|
signing_key:
|
203
202
|
specification_version: 4
|
204
203
|
summary: Simple Image Edits
|