free-image 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ebfb83c042b8dc13d9284759db6aaafb51f706d
4
- data.tar.gz: 94a96105ad584b3a77175d2a91d997316cc303bb
3
+ metadata.gz: b80f09322715f18c6adf980159eb13c0db8deb0b
4
+ data.tar.gz: 50509e7fc8fd8f17e0e0a87ec8ab7523ebd35433
5
5
  SHA512:
6
- metadata.gz: 7e468e23c9918e0bebe109220e49c563277d700fc5a10d4e924a0042ae32900117e28817388dd95c48fb55659764749eb65ccc6ecaf567afa2f316d6c1380940
7
- data.tar.gz: bfd559ca4e30420bf107711e3e96258e6287531407810786844ff31a00e76b1b84381eea461a71a33686b09f9e2d00cd19eaa2d633703cc69e35dfc7f86e284b
6
+ metadata.gz: 9a34fde0edddd9ac02e995f9d8d9ea5b15811085fa5a1b99d327642edd00062c1b4e008216e604e4de1c8f02a9e460ea818d0a643f029c41e12b70d698575a7d
7
+ data.tar.gz: ec442eeee1c6c90935b545a14ea04452537daffb7851e072aa44baf451ccbf72df0fe8948080183000aea6528d78ac96ce21bec881adf07238b16bce0412c7eb
data/HISTORY CHANGED
@@ -1,5 +1,8 @@
1
1
  = Release History
2
2
 
3
+ == 0.7.1 / 2015-12-02
4
+ * Don't crash if FreeImage_HasRGBMasks does not exist
5
+
3
6
  == 0.7.0 / 2015-10-10
4
7
  * Add test and example for compositing images (Charlie Savage)
5
8
  * Specify freeimage version requirement (Charlie Savage)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'free-image'
5
- spec.version = '0.7.0'
5
+ spec.version = '0.7.1'
6
6
  spec.summary = 'Ruby Bindings for the Free Image Library'
7
7
  spec.description = <<-EOS
8
8
  FreeImage is an Open Source library project for developers who would like to support
@@ -50,9 +50,6 @@ module FreeImage
50
50
  #DLL_API BITMAPINFOHEADER DLL_CALLCONV FreeImage_GetInfoHeader(FIBITMAP *dib);
51
51
  attach_function('FreeImage_GetInfoHeader', [:pointer], FreeImage::InfoHeader)
52
52
 
53
- #DLL_API BOOL DLL_CALLCONV FreeImage_hasRGBMasks(FIBITMAP *dib);
54
- attach_function('FreeImage_HasRGBMasks', [:pointer], FreeImage::Boolean)
55
-
56
53
  #DLL_API unsigned DLL_CALLCONV FreeImage_GetTransparencyCount(FIBITMAP *dib);
57
54
  attach_function('FreeImage_GetTransparencyCount', [:pointer], :ulong)
58
55
 
@@ -76,7 +73,13 @@ module FreeImage
76
73
 
77
74
  # DLL_API BOOL DLL_CALLCONV FreeImage_SetBackgroundColor(FIBITMAP *dib, RGBQUAD *bkcolor);
78
75
  attach_function('FreeImage_SetBackgroundColor', [:pointer, :pointer], FreeImage::Boolean)
79
-
76
+
77
+ begin
78
+ attach_function('FreeImage_HasRGBMasks', [:pointer], FreeImage::Boolean)
79
+ rescue FFI::NotFoundError
80
+ # nothing to do
81
+ end
82
+
80
83
  # Once a bitmap is loaded into memory, you can use the following methods to
81
84
  # retrieve information about is type, dimensions, colors, etc.
82
85
  module Information
@@ -60,6 +60,8 @@ module FreeImage
60
60
 
61
61
  # The Encoder module defines various constants that
62
62
  # control how various image formats are saved.
63
+ #
64
+ # Note, some image formats, such as JPEG, reserve an optional integer range for setting the quality level. For example, to save a progressive JPEG with a quality of 90 (out of 100), you'd use the following flag <tt>90 | JPEG_PROGRESSIVE</tt>. For more information, refer to the FreeImage documentation: http://freeimage.sourceforge.net/documentation.html.
63
65
  module Encoder
64
66
  BMP_DEFAULT = 0x0
65
67
  BMP_SAVE_RLE = 0x1
@@ -176,4 +178,4 @@ module FreeImage
176
178
  Bitmap.new(ptr, self)
177
179
  end
178
180
  end
179
- end
181
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: free-image
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charlie Savage
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-10 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -175,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
175
175
  version: '0'
176
176
  requirements: []
177
177
  rubyforge_project:
178
- rubygems_version: 2.4.5
178
+ rubygems_version: 2.4.5.1
179
179
  signing_key:
180
180
  specification_version: 4
181
181
  summary: Ruby Bindings for the Free Image Library