magro 0.3.0 → 0.4.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 +4 -4
- data/.coveralls.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -0
- data/README.md +14 -12
- data/ext/magro/{io.c → imgrw.c} +1 -1
- data/ext/magro/{io.h → imgrw.h} +0 -0
- data/ext/magro/magro.h +1 -1
- data/lib/magro/version.rb +1 -1
- data/magro.gemspec +7 -2
- metadata +14 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8bfcf8b7886c7fa5d89556642be97b077f6bf96d7a1725fd2cb8cf1b15c0aef
|
4
|
+
data.tar.gz: b0ab5bff6959f1264ed584dcefc25fb7a64fc866164f73dcf11b1556e7cf6377
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f40b650588ec98b33aa8d88bd5c0fb11d4dc8b14faaa197751275f478c2c316e7348b5bd1ff4cc55d33e451036b6b6411fc4f60d9d374c787c91d30ff661abc4
|
7
|
+
data.tar.gz: 7df4bfc3e747f2e8d8fb2dad307df3a0b6370fae1b6c53df66797252629851cf57ab256fdcc64088950ce9177ee2d6ca3a694e498588dc3b4baeef17c771d928
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
# 0.4.0
|
2
|
+
- Rename extension file for reading and writing image file.
|
3
|
+
- Update documentations.
|
4
|
+
|
1
5
|
# 0.3.0
|
2
6
|
- Add [filter module](https://yoshoku.github.io/magro/doc/Magro/Filter.html) consists of image filtering methods.
|
3
7
|
- Change to use round instead of ceil in [quantization of resize method](https://github.com/yoshoku/magro/commit/1b3308ddfb98a650889483af3cd2045aaf6b8837) when given integer image.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,17 +1,21 @@
|
|
1
1
|
# Magro
|
2
2
|
|
3
3
|
[](https://travis-ci.org/yoshoku/magro)
|
4
|
+
[](https://coveralls.io/github/yoshoku/magro?branch=master)
|
4
5
|
[](https://badge.fury.io/rb/magro)
|
5
6
|
[](https://github.com/yoshoku/numo-liblinear/blob/master/LICENSE.txt)
|
6
7
|
[](https://yoshoku.github.io/magro/doc/)
|
7
8
|
|
8
|
-
Magro is
|
9
|
-
Magro uses [Numo::NArray](https://github.com/ruby-numo/numo-narray) arrays as image objects
|
9
|
+
Magro is a minimal image processing library in Ruby.
|
10
|
+
Magro uses [Numo::NArray](https://github.com/ruby-numo/numo-narray) arrays as image objects and
|
11
|
+
provides basic image processing functions.
|
12
|
+
Current supporting features are reading and writing JPEG and PNG images,
|
13
|
+
image resizing with bilinear interpolation method, and image filtering.
|
10
14
|
|
11
15
|
## Installation
|
12
16
|
|
13
|
-
Magro dependents libpng and libjpeg to provides functions
|
14
|
-
|
17
|
+
Magro dependents libpng and libjpeg to provides functions reading and writing image file.
|
18
|
+
Moreover, it is recommended that using libpng version 1.6 or later.
|
15
19
|
|
16
20
|
macOS:
|
17
21
|
|
@@ -35,25 +39,23 @@ Or install it yourself as:
|
|
35
39
|
|
36
40
|
$ gem install magro
|
37
41
|
|
42
|
+
## Documentation
|
43
|
+
|
44
|
+
- [Magro API Documentation](https://yoshoku.github.io/magro/doc/)
|
45
|
+
|
38
46
|
## Usage
|
39
47
|
|
40
48
|
```ruby
|
41
49
|
> require 'magro'
|
42
50
|
=> true
|
43
|
-
> image = Magro::IO.imread('
|
51
|
+
> image = Magro::IO.imread('foo.png')
|
44
52
|
=> Numo::UInt8#shape=[512,512,3]
|
45
53
|
> grayscale = image.median(axis: 2)
|
46
54
|
=> Numo::UInt8#shape=[512,512]
|
47
|
-
> Magro::IO.imsave('
|
55
|
+
> Magro::IO.imsave('foo_gray.png', grayscale)
|
48
56
|
=> true
|
49
57
|
```
|
50
58
|
|
51
|
-
## Development
|
52
|
-
|
53
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
54
|
-
|
55
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
56
|
-
|
57
59
|
## Contributing
|
58
60
|
|
59
61
|
Bug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/magro.
|
data/ext/magro/{io.c → imgrw.c}
RENAMED
data/ext/magro/{io.h → imgrw.h}
RENAMED
File without changes
|
data/ext/magro/magro.h
CHANGED
data/lib/magro/version.rb
CHANGED
data/magro.gemspec
CHANGED
@@ -8,8 +8,13 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ['yoshoku']
|
9
9
|
spec.email = ['yoshoku@outlook.com']
|
10
10
|
|
11
|
-
spec.summary = 'Magro is
|
12
|
-
spec.description =
|
11
|
+
spec.summary = 'Magro is a minimal image processing library for Ruby.'
|
12
|
+
spec.description = <<~MSG
|
13
|
+
Magro is a minimal image processing library for Ruby.
|
14
|
+
Magro uses Numo::NArray arrays as image objects and provides basic image processing functions.
|
15
|
+
Current supporting features are reading and writing JPEG and PNG images,
|
16
|
+
image resizing with bilinear interpolation method, and image filtering.
|
17
|
+
MSG
|
13
18
|
|
14
19
|
spec.homepage = 'https://github.com/yoshoku/magro'
|
15
20
|
spec.license = 'BSD-3-Clause'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: magro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshoku
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: numo-narray
|
@@ -24,7 +24,11 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.9.1
|
27
|
-
description:
|
27
|
+
description: |
|
28
|
+
Magro is a minimal image processing library for Ruby.
|
29
|
+
Magro uses Numo::NArray arrays as image objects and provides basic image processing functions.
|
30
|
+
Current supporting features are reading and writing JPEG and PNG images,
|
31
|
+
image resizing with bilinear interpolation method, and image filtering.
|
28
32
|
email:
|
29
33
|
- yoshoku@outlook.com
|
30
34
|
executables: []
|
@@ -32,6 +36,7 @@ extensions:
|
|
32
36
|
- ext/magro/extconf.rb
|
33
37
|
extra_rdoc_files: []
|
34
38
|
files:
|
39
|
+
- ".coveralls.yml"
|
35
40
|
- ".gitignore"
|
36
41
|
- ".rspec"
|
37
42
|
- ".travis.yml"
|
@@ -44,8 +49,8 @@ files:
|
|
44
49
|
- bin/console
|
45
50
|
- bin/setup
|
46
51
|
- ext/magro/extconf.rb
|
47
|
-
- ext/magro/
|
48
|
-
- ext/magro/
|
52
|
+
- ext/magro/imgrw.c
|
53
|
+
- ext/magro/imgrw.h
|
49
54
|
- ext/magro/magro.c
|
50
55
|
- ext/magro/magro.h
|
51
56
|
- lib/magro.rb
|
@@ -62,7 +67,7 @@ metadata:
|
|
62
67
|
source_code_uri: https://github.com/yoshoku/magro
|
63
68
|
changelog_uri: https://github.com/yoshoku/magro/blob/master/CHANGELOG.md
|
64
69
|
documentation_uri: https://yoshoku.github.io/magro/doc/
|
65
|
-
post_install_message:
|
70
|
+
post_install_message:
|
66
71
|
rdoc_options: []
|
67
72
|
require_paths:
|
68
73
|
- lib
|
@@ -78,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
83
|
version: '0'
|
79
84
|
requirements: []
|
80
85
|
rubygems_version: 3.1.2
|
81
|
-
signing_key:
|
86
|
+
signing_key:
|
82
87
|
specification_version: 4
|
83
|
-
summary: Magro is
|
88
|
+
summary: Magro is a minimal image processing library for Ruby.
|
84
89
|
test_files: []
|