# Blur on transparent images with RMagick

**URL:** <https://www.ruby-forum.com/t/blur-on-transparent-images-with-rmagick/155769>\
**Category:** Ruby\
**Created:** [December 16, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/blur-on-transparent-images-with-rmagick/155769 "2008-12-16T16:05:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [December 16, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/blur-on-transparent-images-with-rmagick/155769/1 "2008-12-16T16:05:47Z")

</div>

Hello,

Let’s start with some code. [http://pastie.org/340438](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?

---

<div class="post-metadata">

**Author:** ![leethal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e99b99/32.png) [@leethal](https://www.ruby-forum.com/u/leethal)\
**Post date:** [December 16, 2008, 11:42pm UTC](https://www.ruby-forum.com/t/blur-on-transparent-images-with-rmagick/155769/2 "2008-12-16T23:42:09Z")

</div>

August L. wrote:

> Hello,
> 
> Let’s start with some code. [http://pastie.org/340438](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](http://rubyforge.org/forum/forum.php?forum_id=33)) or directly at  
rmagick AT rubyforge DOT org.
