magro 0.2.0 → 0.4.3

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
  SHA256:
3
- metadata.gz: 4e24a0d3e82248b27f8a652e84ebe382363234a082732af2b1c18a55ea0dc6c3
4
- data.tar.gz: dc3bc91550338e59455d2ea51effcaf6934b0970c7169434a2cce7422c852252
3
+ metadata.gz: f911e57e71f9fda41695c940712fd4e471d543dab28e924c9d15459cac02d62e
4
+ data.tar.gz: 37a3d0c6702219ec3cfee20fe9f319e2aff5945d1ed6d3ba28f842a9eee4a4c0
5
5
  SHA512:
6
- metadata.gz: 000e7447d4f24a0dd6c97610c5c057ee96feb6eb0698a4e3564e7cec29ce6103a1ac3479f12a90fd1d1436ea89329418097197ad346879cc00018cca25e25aa0
7
- data.tar.gz: f8a09aad3d5fcadc92e753a453213f8c33e66fbde0522a263afeb02b7a3ceaaf3245c6801f9d61bde41fe7015070391bd3cba8298dc2a1ca275e4ed4e110c60b
6
+ metadata.gz: ff9033acf66ce81535d2c9aaa0e8843a35004cf9082b84b9aad1169c859074658e1b0bdb30b144d20f594264a7ad94c2be039f22462b1f8976edff9ffb08a01b
7
+ data.tar.gz: 938646fe6a9d838ec85f429a117f94ca44feb035d7e6b40ac8480549f81007b967a5ba6f79a204949848f5a4e9d17b25c360221744eb39b3d2f7beb6ec791d06
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: github-ci
@@ -0,0 +1,23 @@
1
+ name: build
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ build:
7
+ runs-on: ubuntu-20.04
8
+ strategy:
9
+ matrix:
10
+ ruby: [ '2.5', '2.6', '2.7', '3.0' ]
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ - name: Install libpng and libjpeg
14
+ run: sudo apt-get install -y libpng-dev libjpeg-dev
15
+ - name: Set up Ruby ${{ matrix.ruby }}
16
+ uses: actions/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.ruby }}
19
+ - name: Build and test with Rake
20
+ run: |
21
+ gem install --no-document bundler
22
+ bundle install --jobs 4 --retry 3
23
+ bundle exec rake
@@ -0,0 +1,29 @@
1
+ name: coverage
2
+
3
+ on:
4
+ push:
5
+ branches: [ main ]
6
+ pull_request:
7
+ branches: [ main ]
8
+
9
+ jobs:
10
+ coverage:
11
+ runs-on: ubuntu-20.04
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Install libpng and libjpeg
15
+ run: sudo apt-get install -y libpng-dev libjpeg-dev
16
+ - uses: actions/checkout@v2
17
+ - name: Set up Ruby 2.7
18
+ uses: actions/setup-ruby@v1
19
+ with:
20
+ ruby-version: '2.7'
21
+ - name: Build and test with Rake
22
+ run: |
23
+ gem install bundler
24
+ bundle install
25
+ bundle exec rake
26
+ - name: Coveralls GitHub Action
27
+ uses: coverallsapp/github-action@v1.1.2
28
+ with:
29
+ github-token: ${{ secrets.GITHUB_TOKEN }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # 0.4.3
2
+ - Fix imread method to read image from URL.
3
+ - Fix some configulation files.
4
+
5
+ # 0.4.2
6
+ - Add GC guard to reading and writing image methods.
7
+
8
+ # 0.4.1
9
+ - Add GC guard to narray given to native extension method.
10
+ - Fix some configulation files.
11
+
12
+ # 0.4.0
13
+ - Rename extension file for reading and writing image file.
14
+ - Update documentations.
15
+
16
+ # 0.3.0
17
+ - Add [filter module](https://yoshoku.github.io/magro/doc/Magro/Filter.html) consists of image filtering methods.
18
+ - Change to use round instead of ceil in [quantization of resize method](https://github.com/yoshoku/magro/commit/1b3308ddfb98a650889483af3cd2045aaf6b8837) when given integer image.
19
+
1
20
  # 0.2.0
2
21
  - Add [transform module](https://yoshoku.github.io/magro/doc/Magro/Transform.html) and resize method.
3
22
  - Fix some configulation files.
data/Gemfile CHANGED
@@ -4,6 +4,8 @@ source 'https://rubygems.org'
4
4
  gemspec
5
5
 
6
6
  gem 'bundler', '~> 2.0'
7
- gem 'rake', '~> 12.0'
7
+ gem 'rake', '~> 13.0'
8
8
  gem 'rake-compiler', '~> 1.0'
9
9
  gem 'rspec', '~> 3.0'
10
+ gem 'simplecov', '~> 0.19'
11
+ gem 'simplecov-lcov', '~> 0.8'
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019-2020 Atsushi Tatsuma
1
+ Copyright (c) 2019-2021 Atsushi Tatsuma
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
data/README.md CHANGED
@@ -1,17 +1,21 @@
1
1
  # Magro
2
2
 
3
- [![Build Status](https://travis-ci.org/yoshoku/magro.svg?branch=master)](https://travis-ci.org/yoshoku/magro)
3
+ [![Build Status](https://github.com/yoshoku/magro/workflows/build/badge.svg)](https://github.com/yoshoku/magro/actions?query=workflow%3Abuild)
4
+ [![Coverage Status](https://coveralls.io/repos/github/yoshoku/magro/badge.svg?branch=main)](https://coveralls.io/github/yoshoku/magro?branch=main)
4
5
  [![Gem Version](https://badge.fury.io/rb/magro.svg)](https://badge.fury.io/rb/magro)
5
- [![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/numo-liblinear/blob/master/LICENSE.txt)
6
- [![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](https://yoshoku.github.io/magro/doc/)
6
+ [![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/numo-liblinear/blob/main/LICENSE.txt)
7
+ [![Documentation](http://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/magro/doc/)
7
8
 
8
- Magro is an image processing library in Ruby.
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 loading image file.
14
- It is recommended that using libpng version 1.6 or later.
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('lena.png')
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('lena_gray.png', grayscale)
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.
@@ -61,4 +63,4 @@ This project is intended to be a safe, welcoming space for collaboration, and co
61
63
 
62
64
  ## Code of Conduct
63
65
 
64
- Everyone interacting in the Magro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/magro/blob/master/CODE_OF_CONDUCT.md).
66
+ Everyone interacting in the Magro project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/magro/blob/main/CODE_OF_CONDUCT.md).
@@ -1,4 +1,4 @@
1
- #include "io.h"
1
+ #include "imgrw.h"
2
2
 
3
3
  RUBY_EXTERN VALUE mMagro;
4
4
 
@@ -126,6 +126,8 @@ VALUE magro_io_read_png(VALUE self, VALUE filename_)
126
126
  fclose(file_ptr);
127
127
  png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
128
128
 
129
+ RB_GC_GUARD(filename_);
130
+
129
131
  return nary;
130
132
  }
131
133
 
@@ -226,6 +228,9 @@ VALUE magro_io_save_png(VALUE self, VALUE filename_, VALUE image)
226
228
  png_free(png_ptr, row_ptr_ptr);
227
229
  png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
228
230
 
231
+ RB_GC_GUARD(image);
232
+ RB_GC_GUARD(filename_);
233
+
229
234
  return Qtrue;
230
235
  }
231
236
 
@@ -298,6 +303,8 @@ VALUE magro_io_read_jpg(VALUE self, VALUE filename_)
298
303
  jpeg_finish_decompress(&jpeg);
299
304
  jpeg_destroy_decompress(&jpeg);
300
305
 
306
+ RB_GC_GUARD(filename_);
307
+
301
308
  return nary;
302
309
  }
303
310
 
@@ -398,6 +405,9 @@ VALUE magro_io_save_jpg(int argc, VALUE* argv, VALUE self)
398
405
 
399
406
  fclose(file_ptr);
400
407
 
408
+ RB_GC_GUARD(image);
409
+ RB_GC_GUARD(filename_);
410
+
401
411
  return Qtrue;
402
412
  }
403
413
 
File without changes
data/ext/magro/magro.h CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  #include <ruby.h>
5
5
 
6
- #include "io.h"
6
+ #include "imgrw.h"
7
7
 
8
8
  #endif /* MAGRO_H */
data/lib/magro.rb CHANGED
@@ -5,5 +5,6 @@ require 'numo/narray'
5
5
  require 'magro/version'
6
6
  require 'magro/magro'
7
7
 
8
+ require 'magro/filter'
8
9
  require 'magro/io'
9
10
  require 'magro/transform'
@@ -0,0 +1,118 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Magro
4
+ # Filter module provides functions for image filtering.
5
+ module Filter
6
+ module_function
7
+
8
+ # Applies box filter to image.
9
+ # This method performs zero padding as a preprocessing.
10
+ #
11
+ # @example
12
+ # image = Magro::IO.imread('foo.png')
13
+ # kernel = Numo::DFloat[
14
+ # [1, 1, 1],
15
+ # [1, 1, 1],
16
+ # [1, 1, 1]
17
+ # ]
18
+ # blured_image = Magro::Filter.filter2d(image, kernel)
19
+ # Magro::IO.imsave('bar.png', blured_image)
20
+ #
21
+ # @param image [Numo::UInt8] (shape: [height, width, n_channels]) Input image to be filtered.
22
+ # @param kernel [Numo::DFloat] (shape: [kernel_height, kernel_width]) Box filter.
23
+ # @param scale [Float/Nil] Scale parameter for box filter. If nil is given, the box filter is normalized with sum of filter values.
24
+ # @param offset [Integer] Offset value of filtered image.
25
+ # @raise [ArgumentError] This error is raised when class of input image is not Numo::NArray.
26
+ # @return [Numo::UInt8] (shape: [height, width, n_channels]) Filtered image.
27
+ def filter2d(image, kernel, scale: nil, offset: 0)
28
+ raise ArgumentError, 'Expect class of image to be Numo::NArray.' unless image.is_a?(Numo::NArray)
29
+ filter_h, filter_w = kernel.shape
30
+ padded = zero_padding(image, filter_h, filter_w)
31
+ n_channels = image.shape[2]
32
+ if n_channels.nil?
33
+ filter1ch(padded, kernel, scale, offset)
34
+ else
35
+ image.class.zeros(*image.shape).tap do |filtered|
36
+ n_channels.times do |c|
37
+ filtered[true, true, c] = filter1ch(padded[true, true, c], kernel, scale, offset)
38
+ end
39
+ end
40
+ end
41
+ end
42
+
43
+ # Convolve two 2-dimensional arrays.
44
+ #
45
+ # @param arr1 [Numo::NArray] (shape: [row1, col1]) First input array.
46
+ # @param arr2 [Numo::NArray] (shape: [row2, col2]) Second input array.
47
+ # @raise [ArgumentError] This error is raised when class of input array is not Numo::NArray.
48
+ # @return [Numo::NArray] (shape: [row1 - row2 + 1, col1 - col2 + 1]) Convolution of arr1 with arr2.
49
+ def convolve2d(arr1, arr2)
50
+ raise ArgumentError, 'Expect class of first input array to be Numo::NArray.' unless arr1.is_a?(Numo::NArray)
51
+ raise ArgumentError, 'Expect class of second input array to be Numo::NArray.' unless arr2.is_a?(Numo::NArray)
52
+ raise ArgumentError, 'Expect first input array to be 2-dimensional array.' unless arr1.ndim == 2
53
+ raise ArgumentError, 'Expect second input array to be 2-dimensional array.' unless arr2.ndim == 2
54
+ row1, col1 = arr1.shape
55
+ row2, col2 = arr2.shape
56
+ # FIXME: lib/numo/narray/extra.rb:1098: warning: Using the last argument as keyword parameters is deprecated
57
+ # convolved = im2col(arr1, row2, col2).dot(arr2.flatten)
58
+ convolved = arr2.flatten.dot(im2col(arr1, row2, col2).transpose)
59
+ convolved.reshape(row1 - row2 + 1, col1 - col2 + 1)
60
+ end
61
+
62
+ # private
63
+
64
+ def zero_padding(image, filter_h, filter_w)
65
+ image_h, image_w, n_channels = image.shape
66
+ pad_h = filter_h / 2
67
+ pad_w = filter_w / 2
68
+ out_h = image_h + pad_h * 2
69
+ out_w = image_w + pad_w * 2
70
+ if n_channels.nil?
71
+ image.class.zeros(out_h, out_w).tap do |padded|
72
+ padded[pad_h...(pad_h + image_h), pad_w...(pad_w + image_w)] = image
73
+ end
74
+ else
75
+ image.class.zeros(out_h, out_w, n_channels).tap do |padded|
76
+ n_channels.times do |c|
77
+ padded[pad_h...(pad_h + image_h), pad_w...(pad_w + image_w), c] = image[true, true, c]
78
+ end
79
+ end
80
+ end
81
+ end
82
+
83
+ def filter1ch(image, kernel, scale, offset)
84
+ scale ||= kernel.sum
85
+ kernel *= scale.zero? ? 1.0 : 1.fdiv(scale)
86
+ filtered = convolve2d(image, kernel)
87
+ filtered = (filtered + offset).round.clip(image.class::MIN, image.class::MAX) if integer_narray?(image)
88
+ filtered = image.class.cast(filtered) unless filtered.is_a?(image.class)
89
+ filtered
90
+ end
91
+
92
+ def im2col(image, filter_h, filter_w)
93
+ height, width = image.shape
94
+ rows = height - filter_h + 1
95
+ cols = width - filter_w + 1
96
+ mat = image.class.zeros(filter_h, filter_w, rows, cols)
97
+ filter_h.times do |y|
98
+ y_end = y + rows
99
+ filter_w.times do |x|
100
+ x_end = x + cols
101
+ mat[y, x, true, true] = image[y...y_end, x...x_end]
102
+ end
103
+ end
104
+ mat.transpose(2, 3, 0, 1).reshape(rows * cols, filter_h * filter_w)
105
+ end
106
+
107
+ INTEGER_NARRAY = %w[Numo::Int8 Numo::Int16 Numo::Int32 Numo::Int64
108
+ Numo::UInt8 Numo::UInt16 Numo::UInt32 Numo::UInt64].freeze
109
+
110
+ private_constant :INTEGER_NARRAY
111
+
112
+ def integer_narray?(image)
113
+ INTEGER_NARRAY.include?(image.class.to_s)
114
+ end
115
+
116
+ private_class_method :zero_padding, :filter1ch, :im2col, :integer_narray?
117
+ end
118
+ end
data/lib/magro/io.rb CHANGED
@@ -1,12 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'open-uri'
4
+ require 'tempfile'
5
+
3
6
  module Magro
4
7
  # IO module provides functions for input and output of image file.
5
8
  module IO
6
9
  module_function
7
10
 
8
11
  # Loads an image from file.
9
- # @param filename [String] Path to image file to be loaded.
12
+ # @param filename [String] File path or URL of image file to be loaded.
10
13
  # Currently, the following file formats are support:
11
14
  # Portbale Network Graphics (*.png) and JPEG files (*.jpeg, *.jpg, *jpe).
12
15
  # @raise [ArgumentError] This error is raised when filename is not String.
@@ -15,8 +18,27 @@ module Magro
15
18
  # @return [Numo::UInt8] (shape: [height, width, n_channels]) Loaded image.
16
19
  def imread(filename)
17
20
  raise ArgumentError, 'Expect class of filename to be String.' unless filename.is_a?(String)
18
- return read_jpg(filename) if filename.downcase =~ /\.(jpeg|jpg|jpe)$/
19
- return read_png(filename) if filename.downcase =~ /\.png$/
21
+
22
+ unless url?(filename)
23
+ return case filename.downcase
24
+ when /\.(jpeg|jpg|jpe)$/
25
+ read_jpg(filename)
26
+ when /\.png$/
27
+ read_png(filename)
28
+ end
29
+ end
30
+
31
+ uri = URI.parse(filename)
32
+ ext = File.extname(uri.path).downcase
33
+ raise IOError, 'Failed to detect file extension from given URL.' unless ext =~ /\.(jpeg|jpg|jpe|png)$/
34
+
35
+ uri.open do |file|
36
+ temp = Tempfile.new(['magro_', ext])
37
+ temp.binmode
38
+ temp.write(file.read)
39
+ temp.rewind
40
+ imread(temp.path)
41
+ end
20
42
  end
21
43
 
22
44
  # Saves an image to file.
@@ -46,6 +68,11 @@ module Magro
46
68
  false
47
69
  end
48
70
 
49
- private_class_method :read_jpg, :read_png, :save_jpg, :save_png
71
+ def url?(str)
72
+ uri = URI.parse(str)
73
+ uri.is_a?(URI::HTTP) || uri.is_a?(URI::HTTPS)
74
+ end
75
+
76
+ private_class_method :read_jpg, :read_png, :save_jpg, :save_png, :url?
50
77
  end
51
78
  end
@@ -58,7 +58,7 @@ module Magro
58
58
 
59
59
  resized = a * (1 - x_d) * (1 - y_d) + b * x_d * (1 - y_d) + c * (1 - x_d) * y_d + d * x_d * y_d
60
60
 
61
- resized = resized.ceil.clip(image.class::MIN, image.class::MAX) if integer_narray?(image)
61
+ resized = resized.round.clip(image.class::MIN, image.class::MAX) if integer_narray?(image)
62
62
  resized = image.class.cast(resized) unless resized.is_a?(image.class)
63
63
  resized.reshape(new_height, new_width)
64
64
  end
data/lib/magro/version.rb CHANGED
@@ -3,5 +3,5 @@
3
3
  # Magro is an image processing library in Ruby.
4
4
  module Magro
5
5
  # The version of Magro you are using.
6
- VERSION = '0.2.0'
6
+ VERSION = '0.4.3'
7
7
  end
data/magro.gemspec CHANGED
@@ -8,12 +8,22 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['yoshoku']
9
9
  spec.email = ['yoshoku@outlook.com']
10
10
 
11
- spec.summary = 'Magro is an image processing library for Ruby.'
12
- spec.description = 'Magro is an image processing library for Ruby.'
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'
16
21
 
22
+ spec.metadata['homepage_uri'] = spec.homepage
23
+ spec.metadata['source_code_uri'] = 'https://github.com/yoshoku/magro'
24
+ spec.metadata['changelog_uri'] = 'https://github.com/yoshoku/magro/blob/main/CHANGELOG.md'
25
+ spec.metadata['documentation_uri'] = 'https://yoshoku.github.io/magro/doc/'
26
+
17
27
  # Specify which files should be added to the gem when it is released.
18
28
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
29
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
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.2.0
4
+ version: 0.4.3
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-05-03 00:00:00.000000000 Z
11
+ date: 2021-04-03 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: Magro is an image processing library for Ruby.
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,9 +36,11 @@ extensions:
32
36
  - ext/magro/extconf.rb
33
37
  extra_rdoc_files: []
34
38
  files:
39
+ - ".coveralls.yml"
40
+ - ".github/workflows/build.yml"
41
+ - ".github/workflows/coverage.yml"
35
42
  - ".gitignore"
36
43
  - ".rspec"
37
- - ".travis.yml"
38
44
  - CHANGELOG.md
39
45
  - CODE_OF_CONDUCT.md
40
46
  - Gemfile
@@ -44,11 +50,12 @@ files:
44
50
  - bin/console
45
51
  - bin/setup
46
52
  - ext/magro/extconf.rb
47
- - ext/magro/io.c
48
- - ext/magro/io.h
53
+ - ext/magro/imgrw.c
54
+ - ext/magro/imgrw.h
49
55
  - ext/magro/magro.c
50
56
  - ext/magro/magro.h
51
57
  - lib/magro.rb
58
+ - lib/magro/filter.rb
52
59
  - lib/magro/io.rb
53
60
  - lib/magro/transform.rb
54
61
  - lib/magro/version.rb
@@ -56,8 +63,12 @@ files:
56
63
  homepage: https://github.com/yoshoku/magro
57
64
  licenses:
58
65
  - BSD-3-Clause
59
- metadata: {}
60
- post_install_message:
66
+ metadata:
67
+ homepage_uri: https://github.com/yoshoku/magro
68
+ source_code_uri: https://github.com/yoshoku/magro
69
+ changelog_uri: https://github.com/yoshoku/magro/blob/main/CHANGELOG.md
70
+ documentation_uri: https://yoshoku.github.io/magro/doc/
71
+ post_install_message:
61
72
  rdoc_options: []
62
73
  require_paths:
63
74
  - lib
@@ -72,8 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
83
  - !ruby/object:Gem::Version
73
84
  version: '0'
74
85
  requirements: []
75
- rubygems_version: 3.1.2
76
- signing_key:
86
+ rubygems_version: 3.2.7
87
+ signing_key:
77
88
  specification_version: 4
78
- summary: Magro is an image processing library for Ruby.
89
+ summary: Magro is a minimal image processing library for Ruby.
79
90
  test_files: []
data/.travis.yml DELETED
@@ -1,19 +0,0 @@
1
- ---
2
- os: linux
3
- dist: bionic
4
- language: ruby
5
- cache: bundler
6
- rvm:
7
- - '2.4'
8
- - '2.5'
9
- - '2.6'
10
- - '2.7'
11
-
12
- addons:
13
- apt:
14
- packages:
15
- - libpng-dev
16
- - libjpeg-dev
17
-
18
- before_install:
19
- - gem install bundler -v 2.1.4