Blur on transparent images with RMagick

Hello,

Let’s start with some code. http://pastie.org/340438 . If you run it
(after changing the font on line 33), you get a neat image with the
text appearing two times. One flat, the other with a blur.

Now, set the background_color to ‘transparent’ on line 30, and voila
– no blur.

I’m running RMagick 2.8.0 and ImageMagick 6.4.4 2008-11-21 Q16. Anyone
knows what this is all about?

August L. wrote:

Hello,

Let’s start with some code. http://pastie.org/340438 . If you run it
(after changing the font on line 33), you get a neat image with the
text appearing two times. One flat, the other with a blur.

Now, set the background_color to ‘transparent’ on line 30, and voila
– no blur.

I’m running RMagick 2.8.0 and ImageMagick 6.4.4 2008-11-21 Q16. Anyone
knows what this is all about?

blur_image only blurs the RGB channels. Use this instead:

@image = @image.blur_channel(0,3, Magick::AllChannels)

If you have any other questions about RMagick you can reach me at the
RMagick Help Forum on RubyForge
(http://rubyforge.org/forum/forum.php?forum_id=33) or directly at
rmagick AT rubyforge DOT org.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs