0

I'm looking to write the Carrierwave process to add a subimage into another image with MiniMagick, any ideas ?

This doc https://github.com/probablycorey/mini_magick say we can use all the mogrify commandline options of ImageMagick, but don't I need composite to do it ?

Thank you.

Sidhannowe
  • 465
  • 5
  • 11

1 Answers1

2

I have to open my eyes, this is written in the MiniMagick doc:

image = MiniMagick::Image.open("original.png")
result = image.composite(MiniMagick::Image.open("watermark.png", "jpg")) do |c|
  c.gravity "center"
end
result.write "my_output_file.jpg"
EmmanuelB
  • 1,236
  • 9
  • 19
Sidhannowe
  • 465
  • 5
  • 11