hornetseye-rmagick 0.2.0 → 0.2.1

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/Rakefile CHANGED
@@ -6,7 +6,7 @@ require 'rake/packagetask'
6
6
  require 'rbconfig'
7
7
 
8
8
  PKG_NAME = 'hornetseye-rmagick'
9
- PKG_VERSION = '0.2.0'
9
+ PKG_VERSION = '0.2.1'
10
10
  RB_FILES = FileList[ 'lib/**/*.rb' ]
11
11
  TC_FILES = FileList[ 'test/tc_*.rb' ]
12
12
  TS_FILES = FileList[ 'test/ts_*.rb' ]
@@ -0,0 +1,55 @@
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 MultiArray
19
+
20
+ class << self
21
+
22
+ def load_magick( file )
23
+ Magick::Image.read( file ).first.to_multiarray
24
+ end
25
+
26
+ def load_ubyte( file )
27
+ Magick::Image.read( file ).first.to_type UBYTE
28
+ end
29
+
30
+ def load_usint( file )
31
+ Magick::Image.read( file ).first.to_type USINT
32
+ end
33
+
34
+ def load_uint( file )
35
+ Magick::Image.read( file ).first.to_type UINT
36
+ end
37
+
38
+ def load_ubytergb( file )
39
+ Magick::Image.read( file ).first.to_type UBYTERGB
40
+ end
41
+
42
+ def load_usintrgb( file )
43
+ Magick::Image.read( file ).first.to_type USINTRGB
44
+ end
45
+
46
+ def load_uintrgb( file )
47
+ Magick::Image.read( file ).first.to_type UINTRGB
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+
54
+ end
55
+
@@ -71,6 +71,36 @@ module Hornetseye
71
71
  retval
72
72
  end
73
73
 
74
+ def save_magick( file )
75
+ Magick::ImageList.new.push( to_magick ).write file
76
+ self
77
+ end
78
+
79
+ def save_ubyte( file )
80
+ to_ubyte.save_magick file
81
+ end
82
+
83
+ def save_usint( file )
84
+ to_usint.save_magick file
85
+ end
86
+
87
+ def save_uint( file )
88
+ to_uint.save_magick file
89
+ end
90
+
91
+ def save_ubytergb( file )
92
+ to_ubytergb.save_magick file
93
+ end
94
+
95
+ def save_usintrgb( file )
96
+ to_usintrgb.save_magick file
97
+ end
98
+
99
+ def save_uintrgb( file )
100
+ to_uintrgb.save_magick file
101
+ end
102
+
74
103
  end
75
104
 
76
105
  end
106
+
@@ -19,5 +19,6 @@ require 'malloc'
19
19
  require 'multiarray'
20
20
  require 'hornetseye_frame'
21
21
  require 'hornetseye-rmagick/node'
22
+ require 'hornetseye-rmagick/multiarray'
22
23
  require 'hornetseye-rmagick/image'
23
24
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -87,6 +87,7 @@ files:
87
87
  - .document
88
88
  - lib/hornetseye_rmagick.rb
89
89
  - lib/hornetseye-rmagick/image.rb
90
+ - lib/hornetseye-rmagick/multiarray.rb
90
91
  - lib/hornetseye-rmagick/node.rb
91
92
  has_rdoc: yard
92
93
  homepage: http://wedesoft.github.com/hornetseye-rmagick/