Closed Watson1978 closed 2 weeks ago
Fix https://github.com/rmagick/rmagick/issues/46
If colorspace is set through Image#colorspace, the image will be transformed properly. However, if use Info#colorspace, it is not. It should be transformed as well.
require 'rmagick' image = Magick::Image.read('doc/ex/images/Button_0.gif').first image.colorspace = Magick::GRAYColorspace image.write('Image_colorspace_eq.gif') image = Magick::Image.read('doc/ex/images/Button_0.gif') { |info| info.colorspace = Magick::GRAYColorspace }.first image.write('Info_colorspace_eq.gif')
The result with before changing:
Fix https://github.com/rmagick/rmagick/issues/46
If colorspace is set through Image#colorspace, the image will be transformed properly. However, if use Info#colorspace, it is not. It should be transformed as well.
The result with before changing: