rmagick 7.0.0 → 7.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b8378b6521fc857bfee81cb0b0d234cbacd0ea753d2f9be41180f1d4f833086
4
- data.tar.gz: 6492cec6f6802500827e3e0d3b0c2c30b5ab7c000b3c4da68cf5af5dd3b856c1
3
+ metadata.gz: dde5ecba6c9f64a65d65582b49338a8d29e8385b3734f3a959b4c690f0c9ea66
4
+ data.tar.gz: d133faa5b9ab9a6647b5de590538bdcebb86aacaedf1153c0bb1ac5235a63de7
5
5
  SHA512:
6
- metadata.gz: 70fdb4d672961ba027ec56396813d81aa7101e32d3d0b73a42e28e12b779777e27a63e061d2fdcb82ee5ada9ceede1d3cf1f4124b51a62962e6c1eef656a3f66
7
- data.tar.gz: b436f377627611cab9ca86f0b59e2fc8a9a9e8cbd3071fa06036ac841fe136717430851f2043aeaf31175835afab285c5dd2cd3efd5f8de51a8f58cdb38bb595
6
+ metadata.gz: 200d4179fbb2a170ac0e49ca3da399717d76eb5b66a66743fcefc3f4c75a107ecd90296c9c69446b8c7e690c966340c34b64f0c561a3826a86d3bb0d61a8eec7
7
+ data.tar.gz: e301f6a39bac7a1302630bbba806b225381f07716e4514c555d1d39a4e773106bcfc6f61a95cb06ff1aff11044461e448797407585db40518edab77d4f996c48
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project are documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## RMagick 7.0.1
7
+
8
+ Bug Fixes
9
+
10
+ * Image_gray_q changes the colour space of the image, instead of returning whether it's grayscale (#1788)
11
+ * Check for errors from ParseGeometry() (#1786)
12
+ * Fail explicitly when trying to install on JRuby (#1784)
13
+
6
14
  ## RMagick 7.0.0
7
15
 
8
16
  Breaking Changes
@@ -42,6 +42,7 @@ module RMagick
42
42
  def initialize
43
43
  @stdout = $stdout.dup
44
44
 
45
+ exit_failure("JRuby is not supported.\nSee https://github.com/jruby/jruby/wiki/C-Extension-Alternatives") if RUBY_ENGINE == 'jruby'
45
46
  exit_failure("No longer support MSWIN environment.") if RUBY_PLATFORM.include?('mswin')
46
47
 
47
48
  setup_pkg_config_path
@@ -283,7 +284,6 @@ module RMagick
283
284
  _aligned_msize
284
285
  ]
285
286
  imagemagick_api = [
286
- 'SetImageGray', # 6.9.1-10
287
287
  'SetMagickAlignedMemoryMethods' # 7.0.9-0
288
288
  ]
289
289
 
@@ -7929,6 +7929,13 @@ has_image_attribute(VALUE self, MagickBooleanType (attr_test)(const Image *))
7929
7929
  }
7930
7930
  #endif
7931
7931
 
7932
+ static MagickBooleanType
7933
+ Image_is_gray_colorspace_type(const Image *image, ExceptionInfo *exception)
7934
+ {
7935
+ ColorspaceType colorspace = GetImageColorspaceType(image, exception);
7936
+ return (colorspace == GRAYColorspace || colorspace == LinearGRAYColorspace) ? MagickTrue : MagickFalse;
7937
+ }
7938
+
7932
7939
 
7933
7940
  /**
7934
7941
  * Return true if all the pixels in the image have the same red, green, and blue intensities.
@@ -7938,11 +7945,7 @@ has_image_attribute(VALUE self, MagickBooleanType (attr_test)(const Image *))
7938
7945
  VALUE
7939
7946
  Image_gray_q(VALUE self)
7940
7947
  {
7941
- #if defined(HAVE_SETIMAGEGRAY)
7942
- return has_attribute(self, (MagickBooleanType (*)(const Image *, ExceptionInfo *))SetImageGray);
7943
- #else
7944
- return has_attribute(self, IsGrayImage);
7945
- #endif
7948
+ return has_attribute(self, Image_is_gray_colorspace_type);
7946
7949
  }
7947
7950
 
7948
7951
 
@@ -11355,15 +11358,24 @@ Image_random_threshold_channel(int argc, VALUE *argv, VALUE self)
11355
11358
  exception = AcquireExceptionInfo();
11356
11359
 
11357
11360
  #if defined(IMAGEMAGICK_7)
11358
- BEGIN_CHANNEL_MASK(new_image, channels);
11359
11361
  {
11360
11362
  GeometryInfo geometry_info;
11361
11363
 
11362
- ParseGeometry(thresholds, &geometry_info);
11363
- GVL_STRUCT_TYPE(RandomThresholdImage) args = { new_image, geometry_info.rho, geometry_info.sigma, exception };
11364
- CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RandomThresholdImage), &args);
11364
+ if (ParseGeometry(thresholds, &geometry_info) == NoValue && *thresholds)
11365
+ {
11366
+ (void) ThrowMagickException(exception, GetMagickModule(), OptionError,
11367
+ "InvalidArgument", "'%s'", thresholds);
11368
+ }
11369
+ else
11370
+ {
11371
+ BEGIN_CHANNEL_MASK(new_image, channels);
11372
+ {
11373
+ GVL_STRUCT_TYPE(RandomThresholdImage) args = { new_image, geometry_info.rho, geometry_info.sigma, exception };
11374
+ CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RandomThresholdImage), &args);
11375
+ }
11376
+ END_CHANNEL_MASK(new_image);
11377
+ }
11365
11378
  }
11366
- END_CHANNEL_MASK(new_image);
11367
11379
  #else
11368
11380
  GVL_STRUCT_TYPE(RandomThresholdImageChannel) args = { new_image, channels, thresholds, exception };
11369
11381
  CALL_FUNC_WITHOUT_GVL(GVL_FUNC(RandomThresholdImageChannel), &args);
@@ -180,12 +180,17 @@ KernelInfo_builtin(VALUE self, VALUE what, VALUE geometry)
180
180
  KernelInfo *kernel;
181
181
  KernelInfoType kernel_type;
182
182
  GeometryInfo info;
183
+ const char *geom_str;
183
184
  #if defined(IMAGEMAGICK_7)
184
185
  ExceptionInfo *exception;
185
186
  #endif
186
187
 
187
188
  VALUE_TO_ENUM(what, kernel_type, KernelInfoType);
188
- ParseGeometry(StringValueCStr(geometry), &info);
189
+ geom_str = StringValueCStr(geometry);
190
+ if (ParseGeometry(geom_str, &info) == NoValue && *geom_str)
191
+ {
192
+ rb_raise(rb_eArgError, "invalid geometry string");
193
+ }
189
194
 
190
195
  #if defined(IMAGEMAGICK_7)
191
196
  exception = AcquireExceptionInfo();
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magick
4
- VERSION = '7.0.0'
4
+ VERSION = '7.0.1'
5
5
  MIN_RUBY_VERSION = '3.2.0'
6
6
  MIN_IM6_VERSION = '6.9.0'
7
7
  MIN_IM7_VERSION = '7.1.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmagick
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Hunter
@@ -143,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  requirements:
145
145
  - ImageMagick 6.9.0+ (for ImageMagick 6) or 7.1.0+ (for ImageMagick 7)
146
- rubygems_version: 4.0.11
146
+ rubygems_version: 4.0.10
147
147
  specification_version: 4
148
148
  summary: Ruby binding to ImageMagick
149
149
  test_files: []