Radu Ciocan wrote:
> Hello,
>
> I use rmagick to create a new image.
> How can I make this image with 50% transparency?
>
> Thanks
>   
If you just want a solid-color image that's 50% transparent, specify the 
color and transparency when you create the image:

img = Magick::Image.new(columns. rows) {self.background_color = 
Magick::Pixel.new(rr, gg, bb, Magick::MaxRGB/2)}

where columns and rows specify the size of the image, and rr, gg, bb 
specify the red, green, and blue channels.

If you have an image already and you want to change the opacity, use the 
#opacity attribute:

img.opacity = Magick::MaxRGB / 2

http://www.simplesystems.org/RMagick/doc/imageattrs.html#opacity
http://www.simplesystems.org/RMagick/doc/struct.html#Pixel
http://www.simplesystems.org/RMagick/doc/image1.html#new

-- 
RMagick OS X Installer [http://rubyforge.org/projects/rmagick/]
RMagick Hints & Tips [http://rubyforge.org/forum/forum.php?forum_id=1618]
RMagick Installation FAQ [http://rmagick.rubyforge.org/install-faq.html]