给予:
纹理

和一张照片(没有透明背景)

我该如何给照片纹理呢?
具体而言,我希望执行以下步骤:
convert -size 1056x576 tile:Castillo_001.gif Castillo_tiled.gif有MiniMagick的线索吗?或者ImageMagick的答案有什么线索吗?
谢谢一堆。
答案
ImageMagick:
convert IMG_1970.JPG \( -size 2816x1584 tile:background.png -negate \) -compose ColorDodge -composite out.jpg全文答覆:
# I just negatived the background already
img = MiniMagick::Image.open(File.join('IMG_1970.JPG'))
background = MiniMagick::Image.open(File.join('background_negative.png'))
background.combine_options do |c|
c.size "#{img['width']}x#{img['height']}"
c.tile background.path
end
img = img.composite(background) do |c|
c.compose "ColorDodge"
endhttps://stackoverflow.com/questions/20987182
复制相似问题