webp-ffi 1.0.0-x86_64-linux-gnu

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.
data/lib/webp_ffi.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'ffi'
2
+ require 'ffi-compiler/loader'
3
+
4
+ module WebP
5
+ module C
6
+ extend FFI::Library
7
+ ffi_lib FFI::Compiler::Loader.find('webp_ffi')
8
+ end
9
+ end
10
+
11
+ require "webp/options"
12
+ require "webp/c"
13
+ require "webp/error"
14
+ require "webp/info"
15
+ require "webp/webp"
16
+ require "webp/version"
data/sig/webp.rbs ADDED
@@ -0,0 +1,74 @@
1
+ # Type signatures for the public API of the webp-ffi gem.
2
+ module WebP
3
+ VERSION: String
4
+
5
+ # A file name: a String, a Pathname or anything with #to_path.
6
+ type path = String | _ToPath
7
+
8
+ # Image data: a String (or anything with #to_str) or an IO to read from.
9
+ type data = String | _ToStr | _ReadableData
10
+
11
+ interface _ReadableData
12
+ def read: () -> String?
13
+ end
14
+
15
+ # Options are a Hash with Symbol keys; see the README for the names.
16
+ type options = Hash[Symbol, untyped]
17
+
18
+ class Error < StandardError
19
+ attr_reader code: Integer?
20
+ attr_reader reason: Symbol?
21
+
22
+ def initialize: (?String? message, ?code: Integer?, ?reason: Symbol?) -> void
23
+ end
24
+
25
+ class InvalidImageFormatError < Error
26
+ end
27
+
28
+ class EncoderError < Error
29
+ end
30
+
31
+ class DecoderError < Error
32
+ end
33
+
34
+ class Info < Data
35
+ attr_reader width: Integer
36
+ attr_reader height: Integer
37
+ attr_reader format: :lossy | :lossless | :mixed
38
+ attr_reader alpha: bool
39
+ attr_reader animated: bool
40
+ attr_reader metadata: Array[:icc | :exif | :xmp]
41
+
42
+ def self.new: (width: Integer, height: Integer, format: :lossy | :lossless | :mixed, alpha: bool,
43
+ animated: bool, metadata: Array[:icc | :exif | :xmp]) -> instance
44
+
45
+ def lossless?: () -> bool
46
+ def alpha?: () -> bool
47
+ def animated?: () -> bool
48
+ end
49
+
50
+ class RGBAImage < Data
51
+ attr_reader rgba: String
52
+ attr_reader width: Integer
53
+ attr_reader height: Integer
54
+
55
+ def self.new: (rgba: String, width: Integer, height: Integer) -> instance
56
+ end
57
+
58
+ def self.decoder_version: () -> String
59
+ def self.encoder_version: () -> String
60
+
61
+ def self.webp_size: (data data) -> [Integer, Integer]
62
+ | (nil) -> nil
63
+ def self.info: (data data) -> Info
64
+ | (nil) -> nil
65
+
66
+ def self.encode: (path input_file, path output_file, ?options options) -> true
67
+ def self.decode: (path input_file, path output_file, ?options options) -> true
68
+
69
+ def self.encode_data: (data data, ?options options) -> String
70
+ def self.decode_data: (data data, ?options options) -> String
71
+
72
+ def self.encode_rgba: (String | _ToStr | _ReadableData pixels, Integer width, Integer height, ?options options) -> String
73
+ def self.decode_rgba: (data data, ?options options) -> RGBAImage
74
+ end
metadata ADDED
@@ -0,0 +1,145 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: webp-ffi
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: x86_64-linux-gnu
6
+ authors:
7
+ - Oleksii Vasyliev
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: ffi
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: 1.9.0
19
+ type: :runtime
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: 1.9.0
26
+ - !ruby/object:Gem::Dependency
27
+ name: ffi-compiler
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.1.2
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.1.2
40
+ - !ruby/object:Gem::Dependency
41
+ name: bundler
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '1.2'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '1.2'
54
+ - !ruby/object:Gem::Dependency
55
+ name: rspec
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '3'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '3'
68
+ - !ruby/object:Gem::Dependency
69
+ name: rbs
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ type: :development
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ description: Ruby wrapper for libwebp
83
+ email:
84
+ - leopard.not.a@gmail.com
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - CHANGELOG.md
90
+ - LICENSE.txt
91
+ - README.md
92
+ - ext/webp_ffi/Rakefile
93
+ - ext/webp_ffi/build_config.rb
94
+ - ext/webp_ffi/jpegdec.c
95
+ - ext/webp_ffi/jpegdec.h
96
+ - ext/webp_ffi/metadata.c
97
+ - ext/webp_ffi/metadata.h
98
+ - ext/webp_ffi/pngdec.c
99
+ - ext/webp_ffi/pngdec.h
100
+ - ext/webp_ffi/tiffdec.c
101
+ - ext/webp_ffi/tiffdec.h
102
+ - ext/webp_ffi/util.c
103
+ - ext/webp_ffi/util.h
104
+ - ext/webp_ffi/webp_ffi.c
105
+ - ext/webp_ffi/webp_ffi.h
106
+ - ext/webp_ffi/x86_64-linux/libwebp_ffi.so
107
+ - ext/webp_ffi/x86_64-linux/licenses/libjpeg-turbo-LICENSE.md
108
+ - ext/webp_ffi/x86_64-linux/licenses/libjpeg-turbo-README.ijg
109
+ - ext/webp_ffi/x86_64-linux/licenses/libpng-LICENSE
110
+ - ext/webp_ffi/x86_64-linux/licenses/libtiff-LICENSE.md
111
+ - ext/webp_ffi/x86_64-linux/licenses/libwebp-COPYING
112
+ - ext/webp_ffi/x86_64-linux/licenses/libwebp-PATENTS
113
+ - ext/webp_ffi/x86_64-linux/licenses/zlib-LICENSE
114
+ - ext/webp_ffi/x86_64-linux/versions.txt
115
+ - lib/webp-ffi.rb
116
+ - lib/webp/c.rb
117
+ - lib/webp/error.rb
118
+ - lib/webp/info.rb
119
+ - lib/webp/options.rb
120
+ - lib/webp/version.rb
121
+ - lib/webp/webp.rb
122
+ - lib/webp_ffi.rb
123
+ - sig/webp.rbs
124
+ homepage: http://leopard.in.ua/webp-ffi
125
+ licenses:
126
+ - MIT
127
+ metadata: {}
128
+ rdoc_options: []
129
+ require_paths:
130
+ - lib
131
+ required_ruby_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '3.2'
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ requirements: []
142
+ rubygems_version: 4.0.20
143
+ specification_version: 4
144
+ summary: Ruby wrapper for libwebp
145
+ test_files: []