RMagick transparent_color deprecated? What's the alternative?

Posted by user315975 on Stack Overflow See other posts from Stack Overflow or by user315975
Published on 2010-05-24T04:01:23Z Indexed on 2010/05/24 4:11 UTC
Read the original article Hit count: 198

Filed under:
|

I'm developing an app that does a fair amount of generating transparent pngs on the fly. These are used as overlays, to show areas of interest in a graphic, so they have to have transparent backgrounds.

I am developing in Ruby on Rails, deploying on Heroku. What works fine in development is not working in production. I get this error when I call a drawing routine using RMagick:

NotImplementedError (the `transparent_color=' method is not supported by ImageMagick 6.2.4):
/usr/local/lib/ruby/gems/1.8/gems/rmagick-1.15.17/lib/RMagick.rb:1691:in `transparent_color='

I'm using RMagick version 2.12.1 on the development machine, but I'm not exactly certain how to discover the version of ImageMagick that it's running, so I'm not sure if this is a case of my local code being behind or ahead. I'm hoping behind, because perhaps then there'll be a replacement for this call.

Does anyone know what the fix is here? What's required to generate a transparent background, if not the call I'm using? I can't find this in the documentation: in fact, it was on a third-party site that I found mention of this capability.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about rmagick