ruby-vips 2.0.11 → 2.0.12
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/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/vips/image.rb +10 -6
- data/lib/vips/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c23989cf3757459c2ac719af2ace562ba8fbb290
|
4
|
+
data.tar.gz: 4445f4c2deb1c2ce58ad8afdb2ed17ba9c8010cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fdc125a6e0748faad5db660d7c411cc9350a1f976f3ea63ecf92e5ce3d2eb0d7fa2200e788d52be5b672dc4a4f7482a43b0da1f0aea37e482e7f4da75f4bee5
|
7
|
+
data.tar.gz: 06dcd680d0affffbf36268218f239ac5fc1a9282d2e3a75cbd667082c5715c1b37db5f476e53f312069cbe137b881adfb62fced83d6ce1ef15cd832ead93d288
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.12
|
data/lib/vips/image.rb
CHANGED
@@ -39,7 +39,9 @@ module Vips
|
|
39
39
|
if Vips::at_least_libvips?(8, 6)
|
40
40
|
attach_function :vips_addalpha, [:pointer, :pointer, :varargs], :int
|
41
41
|
end
|
42
|
-
|
42
|
+
if Vips::at_least_libvips?(8, 5)
|
43
|
+
attach_function :vips_image_hasalpha, [:pointer], :int
|
44
|
+
end
|
43
45
|
|
44
46
|
attach_function :vips_image_set,
|
45
47
|
[:pointer, :string, GObject::GValue.ptr], :void
|
@@ -702,11 +704,13 @@ module Vips
|
|
702
704
|
[width, height]
|
703
705
|
end
|
704
706
|
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
707
|
+
if Vips::at_least_libvips?(8, 5)
|
708
|
+
# Detect if image has an alpha channel
|
709
|
+
#
|
710
|
+
# @return [Boolean] true if image has an alpha channel.
|
711
|
+
def has_alpha?
|
712
|
+
return Vips::vips_image_hasalpha(self) != 0
|
713
|
+
end
|
710
714
|
end
|
711
715
|
|
712
716
|
# vips_addalpha was added in libvips 8.6
|
data/lib/vips/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-vips
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Cupitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|