Permalink
Browse files

Fixed defect in colorspace conversion due to change in ImageMagick 6.…

…5.1. Method SetImageColorspace became TransformImageColorspace.
  • Loading branch information...
1 parent 6ce0330 commit b87199c992c0f97f75e936f0f21e5c82665356cd @baror baror committed May 3, 2010
Showing with 6 additions and 1 deletion.
  1. +1 −0 ext/RMagick/extconf.rb
  2. +5 −1 ext/RMagick/rmimage.c
View
1 ext/RMagick/extconf.rb
@@ -244,6 +244,7 @@ def check_partial_imagemagick_versions()
"SetMagickMemoryMethods", # 6.4.1
"SparseColorImage", # 6.3.6-?
"SyncAuthenticPixels", # 6.4.5-6
+ "TransformImageColorspace", # 6.5.1
"TransparentPaintImage", # 6.3.7-10
"TransparentPaintImageChroma" # 6.4.5-6
].each do |func|
View
6 ext/RMagick/rmimage.c
@@ -6,7 +6,7 @@
* Changes since Nov. 2009 copyright © by Benjamin Thomas and Omer Bar-or
*
* @file rmimage.c
- * @version $Id: rmimage.c,v 1.360 2009/12/21 10:34:57 baror Exp $
+ * @version $Id: rmimage.c,v 1.361 2010/05/03 03:34:48 baror Exp $
* @author Tim Hunter
******************************************************************************/
@@ -2993,7 +2993,11 @@ Image_colorspace_eq(VALUE self, VALUE colorspace)
image = rm_check_frozen(self);
VALUE_TO_ENUM(colorspace, new_cs, ColorspaceType);
+#if defined(HAVE_TRANSFORMIMAGECOLORSPACE)
+ (void) TransformImageColorspace(image, new_cs);
+#else
(void) SetImageColorspace(image, new_cs);
+#endif
return self;
}

0 comments on commit b87199c

Please sign in to comment.