Search code examples
imagemagickrmagick

RMagick dissolve tiled


I have a picture of a paper, and I want to make it transparent, overlay it and tile it on top of another image. However, dissolve won't tile it, and composite_tile won't make it transparent. Any tips for how to do this? Currently, I have

image = Magick::Image::from_blob(open(image_path).read)
image = image.composite_tiled(paper_texture_image)

However, this completely covers the image with paper so that you can only see the paper. I want the paper to be see through and still tile.


Solution

  • Just figured it out. You have to do something like this

    paper_texture_image.opacity=0.5*QuantumRange
    

    That will make a somewhat transparent texture.