devil 0.1.9.1 → 0.1.9.5

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/CHANGELOG CHANGED
@@ -1,105 +1,112 @@
1
- 2009-6-12 John Mair (Banisterfiend)
2
- * version 0.1.9.1
3
- * added thumbnail2 and resize2 for anti-aliased image scaling
4
- * made Gosu::Window#screenshot 1.9 compatible (now using glReadPixels)
5
- * using version.rb to help manage versions
6
-
7
- 2009-14-11 John Mair (Banisterfiend)
8
- * added to ruby_il.c:
9
- * IL::SetInteger, IL::JPG_QUALITY
10
- * added to ruby_ilu.c:
11
- * ILU::CompareImage
12
- * added test_quality.rb to tests
13
- * added :jpg_quality option parameter to Devil::Image#save
14
-
15
- 2009-11-11 John Mair (Banisterfiend)
16
- * version 0.1.9.0 re-release
17
- * REMOVED ILUT (OpenGL) support because ILUT is not built with OpenGL support on all platforms (e.g gentoo and some ubuntu distros)
18
-
19
- 2009-11-10 John Mair (Banisterfiend)
20
- * version 0.1.9.0
21
- * added ILUT (OpenGL) support
22
- * updated installation info (no longer using c:\windows\system\ for dlls)
23
-
24
- 2009-10-29 John Mair (Banisterfiend)
25
- * version 0.1.8.8
26
- * added Devil.with_group (for loading multiple images into the same block)
27
- * all images passed into block are cleaned up at end of block
28
- * images at end of block are only free'd if they have not already been freed by user
29
- * ruby_il.c: added IMAGE_BITS_PER_PIXEL and IMAGE_BYTES_PER_PIXEL constants
30
- * finalizers still not implemented
31
-
32
- 2009-10-28 John Mair (Banisterfiend)
33
- * removed finalizer and replaced with explicit call to image.free at end of block. If no block is used, user must call image.free at end of use
34
- * above fixes memory leak.
35
- * changed STR2CSTR() to StringValuePtr() in ruby_il.c
36
-
37
- 2009-10-28 John Mair (Banisterfiend)
38
- * added IL::ConvertImage(IL::RGBA, IL::UNSIGNED_BYTE) to Devil#load; ensures that all image data is in the same format (image files only support RGB/UB and RGBA/UB so make them all RGBA/UB)
39
- * changed compile-time conditional for the IL_LBM constant. now checks if IL_LBM is defined before it tries IL_ILBM
40
-
41
- 2009-10-25 John Mair (Banisterfiend)
42
- version 0.1.8.5
43
- * added hooks: prepare_image_hook, create_image_hook, load_image_hook
44
- * e.g Devil.set_options :load_image_hook => proc { IL::ConvertImage(IL::RGBA, IL::UNSIGNED_BYTE) }
45
- * added Devil.create_image() method for creating blank images (useful as a blitting canvas?)
46
- * added :color parameter to create_image (to set background color of new image)
47
- * added :in_profile and :out_profile to Devil.load_image and Devil.create_image
48
- * color profiles do not appear to work! so not officially supported or documented.
49
- * fixed gosu image flip bug
50
- * added more tests and rdoc
51
-
52
- 2009-10-22 John Mair (Banisterfiend)
53
- * added ESC exit from Devil::Image#show
54
- * added optional :filter parameter to Devil::Image#thumbnail and Devil::Image#resize
55
-
56
- 2009-10-21 John Mair (Banisterfiend)
57
- version 0.1.8
58
- * made LANCZOS3 scaling filter the default for highquality thumbnails
59
- * changed clear color to DevIL default (mother of pearl and full alpha)
60
- * added blit function to HLA (high level API)
61
- * added mirror, edge_detect, emboss, enlarge_canvas, etc to HLA
62
- * added ILU_CENTER, ILU_LOWER_LEFT, ILU_PLACEMENT etc to LLA
63
- * include ILU and IL modules in Devil::Image now
64
- * made Devil::Image#show return self
65
- * made Devil::Image#show use a dup of the image (so a 'snapshot' is taken of image)
66
- * added Devil.set_options method to HLA
67
- * refactored HLA to use an 'action' method, saved code duplication of set_binding/error_check etc.
68
-
69
- 2009-10-17 John Mair (Banisterfiend)
70
- * ruby_il.c added:
71
- * constants: IMAGE_DEPTH, ORIGIN_SET, CONV_PAL, CUR_IMAGE, ORIGIN_LOWER_LEFT, ORIGIN_LOWER_RIGHT
72
- * methods: Disable, OriginFunc, ClearColour, ClearImage.
73
- * Modified FromBlob method to restore old binding after use.
74
- * ruby_ilu.c added:
75
- * methods: EnlargeCanvas, EdgeDetectP, EdgeDetectS, Emboss, Mirror, SwapColours.
76
- * Modified Crop to now take z-axis parameters. (stick to original API as closely as possible)
77
-
78
- 2009-10-15 John Mair (Banisterfiend)
79
- * hopefully fixed compile errors on SnowLeopard!
80
- * added error checking to Devil::load_image()
81
- * added monkeypatch to Gosu::Image::new() to transparently load multiple formats
82
- * updated some rdoc
83
-
84
- 2009-10-13 John Mair (Banisterfiend)
85
- * version 0.1.6
86
- * added Gosu and TexPlay interoperability
87
- * ...bunch of other miscellaneous functionality
88
- * released gem
89
-
90
- 2009-10-10 John Mair (Banisterfiend)
91
- * constants added to ruby_il.c:
92
- * IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_FORMAT, FILE_OVERWRITE
93
- * functions added to ruby_il.c:
94
- * ilEnable, ilGetInteger, ilConvertImage, ToBlob, ilCloneCurImage
95
- * conditional compilation added to ruby_il.c for LBM constant
96
- * functions added to ruby_ilu.c:
97
- * ilFlipImage, ilRotate, ilCrop
98
- * added Gosu and TexPlay interoperability
99
- * ...bunch of other miscellaneous functionality
100
-
101
- 2009-10-06 John Mair (Banisterfiend)
102
- * ruby 1.9 compatibility
103
-
104
- 2006-09-28 Jaroslaw Tworek <dev.jrx@gmail.com>
105
- * Initial release
1
+ 2010-8-10 John Mair (Banisterfiend)
2
+ * version 0.1.9.5
3
+ * mingw32 gem
4
+
5
+ 2010-22-03 John Mair (Banisterfiend)
6
+ * automatically convert from array to packed string in Devil.from_blob
7
+
8
+ 2009-6-12 John Mair (Banisterfiend)
9
+ * version 0.1.9.1
10
+ * added thumbnail2 and resize2 for anti-aliased image scaling
11
+ * made Gosu::Window#screenshot 1.9 compatible (now using glReadPixels)
12
+ * using version.rb to help manage versions
13
+
14
+ 2009-14-11 John Mair (Banisterfiend)
15
+ * added to ruby_il.c:
16
+ * IL::SetInteger, IL::JPG_QUALITY
17
+ * added to ruby_ilu.c:
18
+ * ILU::CompareImage
19
+ * added test_quality.rb to tests
20
+ * added :jpg_quality option parameter to Devil::Image#save
21
+
22
+ 2009-11-11 John Mair (Banisterfiend)
23
+ * version 0.1.9.0 re-release
24
+ * REMOVED ILUT (OpenGL) support because ILUT is not built with OpenGL support on all platforms (e.g gentoo and some ubuntu distros)
25
+
26
+ 2009-11-10 John Mair (Banisterfiend)
27
+ * version 0.1.9.0
28
+ * added ILUT (OpenGL) support
29
+ * updated installation info (no longer using c:\windows\system\ for dlls)
30
+
31
+ 2009-10-29 John Mair (Banisterfiend)
32
+ * version 0.1.8.8
33
+ * added Devil.with_group (for loading multiple images into the same block)
34
+ * all images passed into block are cleaned up at end of block
35
+ * images at end of block are only free'd if they have not already been freed by user
36
+ * ruby_il.c: added IMAGE_BITS_PER_PIXEL and IMAGE_BYTES_PER_PIXEL constants
37
+ * finalizers still not implemented
38
+
39
+ 2009-10-28 John Mair (Banisterfiend)
40
+ * removed finalizer and replaced with explicit call to image.free at end of block. If no block is used, user must call image.free at end of use
41
+ * above fixes memory leak.
42
+ * changed STR2CSTR() to StringValuePtr() in ruby_il.c
43
+
44
+ 2009-10-28 John Mair (Banisterfiend)
45
+ * added IL::ConvertImage(IL::RGBA, IL::UNSIGNED_BYTE) to Devil#load; ensures that all image data is in the same format (image files only support RGB/UB and RGBA/UB so make them all RGBA/UB)
46
+ * changed compile-time conditional for the IL_LBM constant. now checks if IL_LBM is defined before it tries IL_ILBM
47
+
48
+ 2009-10-25 John Mair (Banisterfiend)
49
+ version 0.1.8.5
50
+ * added hooks: prepare_image_hook, create_image_hook, load_image_hook
51
+ * e.g Devil.set_options :load_image_hook => proc { IL::ConvertImage(IL::RGBA, IL::UNSIGNED_BYTE) }
52
+ * added Devil.create_image() method for creating blank images (useful as a blitting canvas?)
53
+ * added :color parameter to create_image (to set background color of new image)
54
+ * added :in_profile and :out_profile to Devil.load_image and Devil.create_image
55
+ * color profiles do not appear to work! so not officially supported or documented.
56
+ * fixed gosu image flip bug
57
+ * added more tests and rdoc
58
+
59
+ 2009-10-22 John Mair (Banisterfiend)
60
+ * added ESC exit from Devil::Image#show
61
+ * added optional :filter parameter to Devil::Image#thumbnail and Devil::Image#resize
62
+
63
+ 2009-10-21 John Mair (Banisterfiend)
64
+ version 0.1.8
65
+ * made LANCZOS3 scaling filter the default for highquality thumbnails
66
+ * changed clear color to DevIL default (mother of pearl and full alpha)
67
+ * added blit function to HLA (high level API)
68
+ * added mirror, edge_detect, emboss, enlarge_canvas, etc to HLA
69
+ * added ILU_CENTER, ILU_LOWER_LEFT, ILU_PLACEMENT etc to LLA
70
+ * include ILU and IL modules in Devil::Image now
71
+ * made Devil::Image#show return self
72
+ * made Devil::Image#show use a dup of the image (so a 'snapshot' is taken of image)
73
+ * added Devil.set_options method to HLA
74
+ * refactored HLA to use an 'action' method, saved code duplication of set_binding/error_check etc.
75
+
76
+ 2009-10-17 John Mair (Banisterfiend)
77
+ * ruby_il.c added:
78
+ * constants: IMAGE_DEPTH, ORIGIN_SET, CONV_PAL, CUR_IMAGE, ORIGIN_LOWER_LEFT, ORIGIN_LOWER_RIGHT
79
+ * methods: Disable, OriginFunc, ClearColour, ClearImage.
80
+ * Modified FromBlob method to restore old binding after use.
81
+ * ruby_ilu.c added:
82
+ * methods: EnlargeCanvas, EdgeDetectP, EdgeDetectS, Emboss, Mirror, SwapColours.
83
+ * Modified Crop to now take z-axis parameters. (stick to original API as closely as possible)
84
+
85
+ 2009-10-15 John Mair (Banisterfiend)
86
+ * hopefully fixed compile errors on SnowLeopard!
87
+ * added error checking to Devil::load_image()
88
+ * added monkeypatch to Gosu::Image::new() to transparently load multiple formats
89
+ * updated some rdoc
90
+
91
+ 2009-10-13 John Mair (Banisterfiend)
92
+ * version 0.1.6
93
+ * added Gosu and TexPlay interoperability
94
+ * ...bunch of other miscellaneous functionality
95
+ * released gem
96
+
97
+ 2009-10-10 John Mair (Banisterfiend)
98
+ * constants added to ruby_il.c:
99
+ * IMAGE_WIDTH, IMAGE_HEIGHT, IMAGE_FORMAT, FILE_OVERWRITE
100
+ * functions added to ruby_il.c:
101
+ * ilEnable, ilGetInteger, ilConvertImage, ToBlob, ilCloneCurImage
102
+ * conditional compilation added to ruby_il.c for LBM constant
103
+ * functions added to ruby_ilu.c:
104
+ * ilFlipImage, ilRotate, ilCrop
105
+ * added Gosu and TexPlay interoperability
106
+ * ...bunch of other miscellaneous functionality
107
+
108
+ 2009-10-06 John Mair (Banisterfiend)
109
+ * ruby 1.9 compatibility
110
+
111
+ 2006-09-28 Jaroslaw Tworek <dev.jrx@gmail.com>
112
+ * Initial release
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- Copyright (C) 2006 Jaroslaw Tworek
2
- Copyright (C) 2009 John Mair
3
-
4
- This software is provided 'as-is', without any express or implied
5
- warranty. In no event will the authors be held liable for any damages
6
- arising from the use of this software.
7
-
8
- Permission is granted to anyone to use this software for any purpose,
9
- including commercial applications, and to alter it and redistribute it
10
- freely, subject to the following restrictions:
11
-
12
- 1. The origin of this software must not be misrepresented; you must not
13
- claim that you wrote the original software. If you use this software
14
- in a product, an acknowledgment in the product documentation would be
15
- appreciated but is not required.
16
- 2. Altered source versions must be plainly marked as such, and must not be
17
- misrepresented as being the original software.
18
- 3. This notice may not be removed or altered from any source distribution.
19
-
20
- Jaroslaw Tworek < dev.jrx@gmail.com >
21
- John Mair, http://banisterfiend.wordpress.com
1
+ Copyright (C) 2006 Jaroslaw Tworek
2
+ Copyright (C) 2009 John Mair
3
+
4
+ This software is provided 'as-is', without any express or implied
5
+ warranty. In no event will the authors be held liable for any damages
6
+ arising from the use of this software.
7
+
8
+ Permission is granted to anyone to use this software for any purpose,
9
+ including commercial applications, and to alter it and redistribute it
10
+ freely, subject to the following restrictions:
11
+
12
+ 1. The origin of this software must not be misrepresented; you must not
13
+ claim that you wrote the original software. If you use this software
14
+ in a product, an acknowledgment in the product documentation would be
15
+ appreciated but is not required.
16
+ 2. Altered source versions must be plainly marked as such, and must not be
17
+ misrepresented as being the original software.
18
+ 3. This notice may not be removed or altered from any source distribution.
19
+
20
+ Jaroslaw Tworek < dev.jrx@gmail.com >
21
+ John Mair, http://banisterfiend.wordpress.com
data/README CHANGED
@@ -1,52 +1,52 @@
1
- Ruby Devil version 0.1.9.1
2
- ========================
3
-
4
- * Original author: Jaroslaw Tworek <dev.jrx@gmail.com>
5
- * Current maintainer: John Mair (banisterfiend) [http://banisterfiend.wordpress.com]
6
-
7
- Ruby bindings for the Developer's Image Library
8
- You need DevIL installed to use this extension
9
-
10
- The Ruby Devil Project page is here: [http://github.com/banister/devil]
11
-
12
-
13
- Installation Instructions:
14
- ==========================
15
-
16
- For debian:
17
-
18
- * install the libdevil and libdevil-dev packages
19
-
20
- For Gentoo:
21
-
22
- * emerge "media-libs/devil"
23
-
24
- For windows:
25
-
26
- * download devil-dlls.zip from [http://github.com/banister/devil/downloads]
27
- * and copy the uncompressed files to c:\ruby\bin\
28
-
29
- For macosx:
30
-
31
- * sudo port install libdevil
32
-
33
- For other systems:
34
-
35
- * install libdevil and lib-devil-dev using your package manager
36
- * OR download and install the libraries from [http://openil.sourceforge.net]
37
-
38
- After you've installed the DevIL libraries you install the gem by going:
39
-
40
- * gem install devil
41
-
42
- If you wish to use the Gosu and TexPlay extensions, it is necessary to also have:
43
-
44
- * the Gosu gem (gem install gosu)
45
- * the TexPlay gem (gem install texplay)
46
- * ruby-opengl (gem install ruby-opengl)
47
-
48
- For now, there is support for just a subset of DevIL functions, but it is enough
49
- for 95% things you may want to do.
50
-
51
- For example uses, see test/ directory
52
- (note: that many of the examples use the Gosu library...this is often just for visualization purposes. Alot of the functionality does not depend on Gosu being present)
1
+ Ruby Devil version 0.1.9.5
2
+ ========================
3
+
4
+ * Original author: Jaroslaw Tworek <dev.jrx@gmail.com>
5
+ * Current maintainer: John Mair (banisterfiend) [http://banisterfiend.wordpress.com]
6
+
7
+ Ruby bindings for the Developer's Image Library
8
+ You need DevIL installed to use this extension
9
+
10
+ The Ruby Devil Project page is here: [http://github.com/banister/devil]
11
+
12
+
13
+ Installation Instructions:
14
+ ==========================
15
+
16
+ For debian:
17
+
18
+ * install the libdevil and libdevil-dev packages
19
+
20
+ For Gentoo:
21
+
22
+ * emerge "media-libs/devil"
23
+
24
+ For windows:
25
+
26
+ * download devil-dlls.zip from [http://github.com/banister/devil/downloads]
27
+ * and copy the uncompressed files to c:\ruby\bin\
28
+
29
+ For macosx:
30
+
31
+ * sudo port install libdevil
32
+
33
+ For other systems:
34
+
35
+ * install libdevil and lib-devil-dev using your package manager
36
+ * OR download and install the libraries from [http://openil.sourceforge.net]
37
+
38
+ After you've installed the DevIL libraries you install the gem by going:
39
+
40
+ * gem install devil
41
+
42
+ If you wish to use the Gosu and TexPlay extensions, it is necessary to also have:
43
+
44
+ * the Gosu gem (gem install gosu)
45
+ * the TexPlay gem (gem install texplay)
46
+ * ruby-opengl (gem install ruby-opengl)
47
+
48
+ For now, there is support for just a subset of DevIL functions, but it is enough
49
+ for 95% things you may want to do.
50
+
51
+ For example uses, see test/ directory
52
+ (note: that many of the examples use the Gosu library...this is often just for visualization purposes. Alot of the functionality does not depend on Gosu being present)
data/Rakefile CHANGED
@@ -1,76 +1,55 @@
1
- require 'rake/clean'
2
-
3
- if RUBY_PLATFORM !~ /win32/
4
- require 'rake/extensiontask'
5
- end
6
-
7
- require 'rake/gempackagetask'
8
- require 'rake/testtask'
9
- require 'rake/rdoctask'
10
-
11
- # get the devil version
12
- require 'lib/devil/version'
13
- dlext = Config::CONFIG['DLEXT']
14
-
15
- CLEAN.include("ext/**/*.#{dlext}", "ext/**/.log", "ext/**/.o", "ext/**/*~", "ext/**/*#*", "ext/**/.obj", "ext/**/.def", "ext/**/.pdb")
16
- CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o", "doc/**")
17
-
18
- spec = Gem::Specification.new do |s|
19
- s.name = "devil"
20
- s.summary = "ruby bindings for devil cross platform image loading library"
21
- s.description = s.summary
22
- s.version = Devil::VERSION
23
- s.author = "Jaroslaw Tworek, John Mair (banisterfiend)"
24
- s.email = 'jrmair@gmail.com'
25
- s.date = Time.now.strftime '%Y-%m-%d'
26
- s.require_path = 'lib'
27
- s.homepage = "http://banisterfiend.wordpress.com"
28
-
29
- if RUBY_PLATFORM =~ /win32/
30
- s.platform = Gem::Platform::CURRENT
31
- else
32
- s.platform = Gem::Platform::RUBY
33
- end
34
-
35
- if RUBY_PLATFORM !~ /win32/
36
- s.extensions = FileList["ext/**/extconf.rb"]
37
- end
38
-
39
- s.has_rdoc = true
40
- s.extra_rdoc_files = ["README"]
41
- s.rdoc_options << '--main' << 'README'
42
- s.files = ["Rakefile", "README", "CHANGELOG", "LICENSE", "lib/devil.rb", "lib/devil/gosu.rb", "lib/devil/version.rb"] +
43
- FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "test/test*.rb", "test/*.png", "test/*.jpg"].to_a
44
-
45
- if RUBY_PLATFORM =~ /win32/
46
- s.files += ["lib/1.8/devil.so", "lib/1.9/devil.so"]
47
- end
48
-
49
- end
50
-
51
- Rake::GemPackageTask.new(spec) do |pkg|
52
- pkg.need_zip = false
53
- pkg.need_tar = false
54
- end
55
-
56
- task :compile => :clean
57
-
58
- if RUBY_PLATFORM !~ /win32/
59
- Rake::ExtensionTask.new('devil', spec) do |ext|
60
- ext.config_script = 'extconf.rb'
61
- ext.cross_compile = true
62
- ext.cross_platform = 'i386-mswin32'
63
- end
64
- end
65
-
66
- Rake::TestTask.new do |t|
67
- t.libs << "lib"
68
- t.test_files = FileList['test/test*.rb']
69
- t.verbose = true
70
- end
71
-
72
- Rake::RDocTask.new do |rd|
73
- rd.main = "README"
74
- rd.rdoc_files.include("README", "lib/devil.rb", "lib/devil/gosu.rb", "lib/devil/version.rb")
75
- end
76
-
1
+ require 'rake/clean'
2
+ require 'rake/gempackagetask'
3
+ require 'rake/testtask'
4
+ require 'rake/rdoctask'
5
+
6
+ # get the devil version
7
+ require './lib/devil/version'
8
+ dlext = Config::CONFIG['DLEXT']
9
+
10
+ CLEAN.include("ext/**/*.#{dlext}", "ext/**/.log", "ext/**/.o", "ext/**/*~", "ext/**/*#*", "ext/**/.obj", "ext/**/.def", "ext/**/.pdb")
11
+ CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o", "doc/**")
12
+
13
+ spec = Gem::Specification.new do |s|
14
+ s.name = "devil"
15
+ s.summary = "Ruby bindings for DevIL cross platform image loading library"
16
+ s.description = s.summary
17
+ s.version = Devil::VERSION
18
+ s.author = "Jaroslaw Tworek, John Mair (banisterfiend)"
19
+ s.email = 'jrmair@gmail.com'
20
+ s.date = Time.now.strftime '%Y-%m-%d'
21
+ s.homepage = "http://banisterfiend.wordpress.com"
22
+
23
+ # s.platform = 'i386-mswin32'
24
+ s.platform = Gem::Platform::RUBY
25
+
26
+ s.extensions = FileList["ext/**/extconf.rb"]
27
+
28
+ s.has_rdoc = 'yard'
29
+ s.extra_rdoc_files = ["README"]
30
+ s.rdoc_options << '--main' << 'README'
31
+ s.files = ["Rakefile", "README", "CHANGELOG", "LICENSE", "lib/devil.rb", "lib/devil/gosu.rb", "lib/devil/version.rb"] +
32
+ FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "test/test*.rb", "test/*.png", "test/*.jpg"].to_a
33
+
34
+ #s.files += ["lib/1.8/devil.so", "lib/1.9/devil.so"]
35
+ end
36
+
37
+ Rake::GemPackageTask.new(spec) do |pkg|
38
+ pkg.need_zip = false
39
+ pkg.need_tar = false
40
+ end
41
+
42
+ task :compile => :clean
43
+
44
+
45
+ Rake::TestTask.new do |t|
46
+ t.libs << "lib"
47
+ t.test_files = FileList['test/test*.rb']
48
+ t.verbose = true
49
+ end
50
+
51
+ Rake::RDocTask.new do |rd|
52
+ rd.main = "README"
53
+ rd.rdoc_files.include("README", "lib/devil.rb", "lib/devil/gosu.rb", "lib/devil/version.rb")
54
+ end
55
+