Sha256: 32d1362a0bd2045f29a564cabd02e8b101807d79f520fcda0f468a4d80329c44

Contents?: true

Size: 348 Bytes

Versions: 19

Compression:

Stored size: 348 Bytes

Contents

require 'rmagick'

img = Magick::Image.read('images/Flower_Hat.jpg').first
begin
  img = img.level_colors('green', 'orange', true)
  img.alpha(Magick::DeactivateAlphaChannel)
rescue NotImplementedError
  not_imp = Magick::Image.read('images/notimplemented.gif').first
  img = not_imp.resize(img.columns, img.rows)
end
img.write('level_colors.jpg')

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
rmagick-4.1.0.rc2 doc/ex/level_colors.rb
rmagick-4.1.0.rc1 doc/ex/level_colors.rb
rmagick-4.0.0 doc/ex/level_colors.rb
rmagick-3.2.0 doc/ex/level_colors.rb
rmagick-3.1.0 doc/ex/level_colors.rb
rmagick-3.0.0 doc/ex/level_colors.rb
rmagick-windows-2.16.5 doc/ex/level_colors.rb
rmagick-windows-2.16.4 doc/ex/level_colors.rb
rmagick-windows-2.16.3 doc/ex/level_colors.rb
rmagick-windows-2.16.2 doc/ex/level_colors.rb
rmagick-windows-2.16.1 doc/ex/level_colors.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/rmagick-2.16.0/doc/ex/level_colors.rb
rmagick-2.16.0 doc/ex/level_colors.rb
rmagick-2.15.4 doc/ex/level_colors.rb
rmagick-2.15.3 doc/ex/level_colors.rb
rmagick-2.15.2 doc/ex/level_colors.rb
rmagick-2.15.1 doc/ex/level_colors.rb
rmagick-2.15.0 doc/ex/level_colors.rb
rmagick-2.14.0 doc/ex/level_colors.rb