hornetseye-openexr 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +1 -0
- data/COPYING +679 -0
- data/README.md +5 -0
- data/Rakefile +195 -0
- data/ext/error.hh +50 -0
- data/ext/frame.cc +81 -0
- data/ext/frame.hh +43 -0
- data/ext/init.cc +42 -0
- data/ext/openexrinput.cc +245 -0
- data/ext/openexrinput.hh +43 -0
- data/ext/openexroutput.cc +191 -0
- data/ext/openexroutput.hh +42 -0
- data/ext/rubyinc.hh +54 -0
- data/ext/rubytools.hh +33 -0
- data/ext/rubytools.tcc +32 -0
- data/lib/hornetseye-openexr/multiarray.rb +47 -0
- data/lib/hornetseye-openexr/node.rb +46 -0
- data/lib/hornetseye-openexr/openexrinput.rb +53 -0
- data/lib/hornetseye-openexr/openexroutput.rb +62 -0
- data/lib/hornetseye_openexr_ext.rb +19 -0
- metadata +138 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
# hornetseye-rmagick - RMagick integration for Hornetseye
|
2
|
+
# Copyright (C) 2010 Jan Wedekind
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
module Hornetseye
|
17
|
+
|
18
|
+
class Node
|
19
|
+
|
20
|
+
def save_openexr( file )
|
21
|
+
output = OpenEXROutput.new file
|
22
|
+
output.write self
|
23
|
+
output.close
|
24
|
+
self
|
25
|
+
end
|
26
|
+
|
27
|
+
def save_sfloat( file )
|
28
|
+
to_type( SFLOAT ).save_openexr file
|
29
|
+
end
|
30
|
+
|
31
|
+
def save_dfloat( file )
|
32
|
+
to_type( DFLOAT ).save_openexr file
|
33
|
+
end
|
34
|
+
|
35
|
+
def save_sfloatrgb( file )
|
36
|
+
to_type( SFLOATRGB ).save_openexr file
|
37
|
+
end
|
38
|
+
|
39
|
+
def save_dfloatrgb( file )
|
40
|
+
to_type( DFLOATRGB ).save_openexr file
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# hornetseye-openexr - Loading and saving images using OpenEXR
|
2
|
+
# Copyright (C) 2010 Jan Wedekind
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
module Hornetseye
|
17
|
+
|
18
|
+
class OpenEXRInput
|
19
|
+
|
20
|
+
class << self
|
21
|
+
|
22
|
+
public
|
23
|
+
|
24
|
+
alias_method :orig_new, :new
|
25
|
+
|
26
|
+
def new( file )
|
27
|
+
if file.is_a? File
|
28
|
+
retval = orig_new file
|
29
|
+
else
|
30
|
+
file = File.new file, 'rb'
|
31
|
+
retval = orig_new file
|
32
|
+
end
|
33
|
+
class << retval
|
34
|
+
def file=( file )
|
35
|
+
@file = file
|
36
|
+
end
|
37
|
+
end
|
38
|
+
# Prevent garbage-collector from closing file.
|
39
|
+
retval.file = file
|
40
|
+
retval
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
def close
|
46
|
+
@file.close if @file
|
47
|
+
@file = nil
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# hornetseye-openexr - Loading and saving images using OpenEXR
|
2
|
+
# Copyright (C) 2010 Jan Wedekind
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
module Hornetseye
|
17
|
+
|
18
|
+
class OpenEXROutput
|
19
|
+
|
20
|
+
class << self
|
21
|
+
|
22
|
+
public
|
23
|
+
|
24
|
+
alias_method :orig_new, :new
|
25
|
+
|
26
|
+
def new( file )
|
27
|
+
if file.is_a? File
|
28
|
+
retval = orig_new file
|
29
|
+
else
|
30
|
+
file = File.new file, 'wb'
|
31
|
+
retval = orig_new file
|
32
|
+
end
|
33
|
+
class << retval
|
34
|
+
def file=( file )
|
35
|
+
@file = file
|
36
|
+
end
|
37
|
+
end
|
38
|
+
retval.file = file
|
39
|
+
retval
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
alias_method :orig_write, :write
|
45
|
+
|
46
|
+
def write( frame )
|
47
|
+
if frame.rgb?
|
48
|
+
orig_write frame.to_type( SFLOATRGB )
|
49
|
+
else
|
50
|
+
orig_write frame.to_type( SFLOAT )
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def close
|
55
|
+
@file.close if @file
|
56
|
+
@file = nil
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
end
|
62
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# hornetseye-openexr - Loading and saving images using OpenEXR
|
2
|
+
# Copyright (C) 2010 Jan Wedekind
|
3
|
+
#
|
4
|
+
# This program is free software: you can redistribute it and/or modify
|
5
|
+
# it under the terms of the GNU General Public License as published by
|
6
|
+
# the Free Software Foundation, either version 3 of the License, or
|
7
|
+
# (at your option) any later version.
|
8
|
+
#
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
# GNU General Public License for more details.
|
13
|
+
#
|
14
|
+
# You should have received a copy of the GNU General Public License
|
15
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
|
+
require 'hornetseye-openexr/openexrinput'
|
17
|
+
require 'hornetseye-openexr/openexroutput'
|
18
|
+
require 'hornetseye-openexr/node'
|
19
|
+
require 'hornetseye-openexr/multiarray'
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hornetseye-openexr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
version: 0.1.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Jan Wedekind
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-10-13 00:00:00 +01:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: malloc
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 1
|
31
|
+
version: "1.1"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: multiarray
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ~>
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
- 10
|
45
|
+
version: "0.10"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: hornetseye-frame
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
- 6
|
59
|
+
version: "0.6"
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rake
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
segments:
|
71
|
+
- 0
|
72
|
+
version: "0"
|
73
|
+
type: :development
|
74
|
+
version_requirements: *id004
|
75
|
+
description: This Ruby extension provides reading and writing high dynamic range images using OpenEXR.
|
76
|
+
email: jan@wedesoft.de
|
77
|
+
executables: []
|
78
|
+
|
79
|
+
extensions:
|
80
|
+
- Rakefile
|
81
|
+
extra_rdoc_files: []
|
82
|
+
|
83
|
+
files:
|
84
|
+
- Rakefile
|
85
|
+
- README.md
|
86
|
+
- COPYING
|
87
|
+
- .document
|
88
|
+
- lib/hornetseye_openexr_ext.rb
|
89
|
+
- lib/hornetseye-openexr/multiarray.rb
|
90
|
+
- lib/hornetseye-openexr/node.rb
|
91
|
+
- lib/hornetseye-openexr/openexroutput.rb
|
92
|
+
- lib/hornetseye-openexr/openexrinput.rb
|
93
|
+
- ext/openexroutput.cc
|
94
|
+
- ext/init.cc
|
95
|
+
- ext/frame.cc
|
96
|
+
- ext/openexrinput.cc
|
97
|
+
- ext/frame.hh
|
98
|
+
- ext/rubytools.hh
|
99
|
+
- ext/openexroutput.hh
|
100
|
+
- ext/rubyinc.hh
|
101
|
+
- ext/error.hh
|
102
|
+
- ext/openexrinput.hh
|
103
|
+
- ext/rubytools.tcc
|
104
|
+
has_rdoc: yard
|
105
|
+
homepage: http://wedesoft.github.com/hornetseye-openexr/
|
106
|
+
licenses: []
|
107
|
+
|
108
|
+
post_install_message:
|
109
|
+
rdoc_options:
|
110
|
+
- --no-private
|
111
|
+
require_paths:
|
112
|
+
- lib
|
113
|
+
- ext
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
none: false
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
segments:
|
120
|
+
- 0
|
121
|
+
version: "0"
|
122
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
|
+
none: false
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
segments:
|
128
|
+
- 0
|
129
|
+
version: "0"
|
130
|
+
requirements: []
|
131
|
+
|
132
|
+
rubyforge_project: hornetseye
|
133
|
+
rubygems_version: 1.3.7
|
134
|
+
signing_key:
|
135
|
+
specification_version: 3
|
136
|
+
summary: Loading and saving images using OpenEXR
|
137
|
+
test_files: []
|
138
|
+
|