colordom 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/colordom/src/lib.rs +7 -1
- data/lib/colordom/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5c8de04d1de01b313514ca8971f57b4050125165d3966c1c9bd5e3e26c978ec
|
4
|
+
data.tar.gz: b0c2eb60501eeaf6b232dd2401961a006bad283dabf669ab6954230dc0aebefb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e2e2465599fc75642c82a1fa568cd757b17ef63a8057dbe1a26d67732e04dc65ea58a190e763e168a97d1aaee570eb46536590341c5bca2c1bca50bfd432d9
|
7
|
+
data.tar.gz: 05e690df2658a015342ce12446bee56c028133d94afdf67469e08ff5349958f00852fb32541fc01beac4ef2316c751dd1027c94c66110c85d3015796088179bb
|
data/ext/colordom/src/lib.rs
CHANGED
@@ -18,6 +18,12 @@ fn colordom_error() -> ExceptionClass {
|
|
18
18
|
})
|
19
19
|
}
|
20
20
|
|
21
|
+
macro_rules! error {
|
22
|
+
($ex:ident) => {
|
23
|
+
Error::new(colordom_error(), $ex.to_string())
|
24
|
+
};
|
25
|
+
}
|
26
|
+
|
21
27
|
#[derive(Clone)]
|
22
28
|
#[magnus::wrap(class = "Colordom::Color", free_immediately, size)]
|
23
29
|
struct Color {
|
@@ -58,7 +64,7 @@ impl Image {
|
|
58
64
|
fn new(path: PathBuf) -> Result<Self, Error> {
|
59
65
|
match image::open(&path) {
|
60
66
|
Ok(img) => Ok(Self { img }),
|
61
|
-
Err(ex) => Err(
|
67
|
+
Err(ex) => Err(error!(ex))
|
62
68
|
}
|
63
69
|
}
|
64
70
|
|
data/lib/colordom/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colordom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonian Guveli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rb_sys
|
@@ -105,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: '0'
|
107
107
|
requirements: []
|
108
|
-
rubygems_version: 3.
|
108
|
+
rubygems_version: 3.5.3
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
111
|
summary: Extract dominant colors from images
|