ruby-vips 1.0.6 → 2.0.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/.travis.yml +9 -12
- data/CHANGELOG.md +5 -1
- data/README.md +32 -115
- data/TODO +4 -6
- data/VERSION +1 -1
- data/example/inheritance_with_refcount.rb +286 -0
- data/lib/ruby-vips.rb +1 -0
- data/lib/vips.rb +425 -93
- data/lib/vips/access.rb +1 -4
- data/lib/vips/align.rb +2 -2
- data/lib/vips/angle.rb +2 -2
- data/lib/vips/angle45.rb +2 -2
- data/lib/vips/bandformat.rb +1 -1
- data/lib/vips/coding.rb +1 -1
- data/lib/vips/direction.rb +2 -2
- data/lib/vips/extend.rb +8 -13
- data/lib/vips/gobject.rb +121 -0
- data/lib/vips/gvalue.rb +251 -0
- data/lib/vips/image.rb +487 -585
- data/lib/vips/interesting.rb +1 -1
- data/lib/vips/interpolate.rb +31 -6
- data/lib/vips/interpretation.rb +1 -1
- data/lib/vips/kernel.rb +1 -1
- data/lib/vips/methods.rb +339 -334
- data/lib/vips/object.rb +204 -0
- data/lib/vips/operation.rb +358 -14
- data/lib/vips/operationboolean.rb +14 -0
- data/lib/vips/operationcomplex.rb +12 -0
- data/lib/vips/operationcomplex2.rb +10 -0
- data/lib/vips/operationcomplexget.rb +11 -0
- data/lib/vips/operationmath.rb +18 -0
- data/lib/vips/operationmath2.rb +10 -0
- data/lib/vips/operationrelational.rb +15 -0
- data/lib/vips/operationround.rb +11 -0
- data/lib/vips/size.rb +2 -1
- data/lib/vips/version.rb +1 -1
- data/ruby-vips.gemspec +2 -6
- metadata +19 -11
- data/lib/vips/argument.rb +0 -159
- data/lib/vips/call.rb +0 -370
- data/lib/vips/demandstyle.rb +0 -35
- data/lib/vips/error.rb +0 -30
- data/lib/vips/foreignflags.rb +0 -20
data/lib/vips/demandstyle.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
module Vips
|
2
|
-
|
3
|
-
# Operations can hint to the VIPS image IO
|
4
|
-
# system about the kind of demand geometry they prefer.
|
5
|
-
#
|
6
|
-
# These demand styles are given below in order of increasing
|
7
|
-
# restrictiveness. When demanding output from a pipeline,
|
8
|
-
# vips_image_generate()
|
9
|
-
# will use the most restrictive of the styles requested by the operations
|
10
|
-
# in the pipeline.
|
11
|
-
#
|
12
|
-
# * `:thinstrip` --- This operation would like to output strips
|
13
|
-
# the width of the image and a few pels high. This is option suitable
|
14
|
-
# for point-to-point operations, such as those in the arithmetic
|
15
|
-
# package.
|
16
|
-
#
|
17
|
-
# This option is only efficient for cases where each output pel depends
|
18
|
-
# upon the pel in the corresponding position in the input image.
|
19
|
-
#
|
20
|
-
# * `:fatstrip` --- This operation would like to output strips
|
21
|
-
# the width of the image and as high as possible. This option is
|
22
|
-
# suitable for area operations which do not violently transform
|
23
|
-
# coordinates, such as vips_conv().
|
24
|
-
#
|
25
|
-
# * `:smalltile` --- This is the most general demand format.
|
26
|
-
# Output is demanded in small (around 100x100 pel) sections. This style
|
27
|
-
# works reasonably efficiently, even for bizzare operations like 45
|
28
|
-
# degree rotate.
|
29
|
-
#
|
30
|
-
# * `:any` --- This image is not being demand-read from a disc
|
31
|
-
# file (even indirectly) so any demand style is OK. It's used for
|
32
|
-
# things like vips_black() where the pixels are calculated.
|
33
|
-
class DemandStyle
|
34
|
-
end
|
35
|
-
end
|
data/lib/vips/error.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
module Vips
|
2
|
-
|
3
|
-
# The ruby-vips error class.
|
4
|
-
class Error < RuntimeError
|
5
|
-
# @param msg [String] The error message. If this is not supplied, grab
|
6
|
-
# and clear the vips error buffer and use that.
|
7
|
-
def initialize(msg = nil)
|
8
|
-
if msg
|
9
|
-
@details = msg
|
10
|
-
elsif Vips::error_buffer != ""
|
11
|
-
@details = Vips::error_buffer
|
12
|
-
Vips::error_clear
|
13
|
-
else
|
14
|
-
@details = nil
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# Pretty-print a {Vips::Error}.
|
19
|
-
#
|
20
|
-
# @return [String] The error message
|
21
|
-
def to_s
|
22
|
-
if @details != nil
|
23
|
-
@details
|
24
|
-
else
|
25
|
-
super.to_s
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
data/lib/vips/foreignflags.rb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
module Vips
|
2
|
-
|
3
|
-
# Some hints about the image loader.
|
4
|
-
#
|
5
|
-
# * `:partial` means that the image can be read directly from the
|
6
|
-
# file without needing to be unpacked to a temporary image first.
|
7
|
-
#
|
8
|
-
# * `:sequential` means that the loader supports lazy reading, but
|
9
|
-
# only top-to-bottom (sequential) access. Formats like PNG can read
|
10
|
-
# sets of scanlines, for example, but only in order.
|
11
|
-
#
|
12
|
-
# If neither partial` or sequential` is set, the loader only supports
|
13
|
-
# whole image read. Setting both partial` and sequential` is an error.
|
14
|
-
#
|
15
|
-
# * `:bigendian` means that image pixels are most-significant byte
|
16
|
-
# first. Depending on the native byte order of the host machine, you may
|
17
|
-
# need to swap bytes. See vips_copy().
|
18
|
-
class ForeignFlags
|
19
|
-
end
|
20
|
-
end
|