- clone from original image and rotate it
- add transparency to cloned image
- combine original image and cloned one
- resize combined image
This ruby script is like below:
require 'mini_magick'
image_original = MiniMagick::Image.open("original.jpg")
image_cloned = image_original.clone
image_cloned.combine_options do |c|
c.flip
c.fill 'white' # set background color
c.colorize '65%'
end
image_cloned.write "cloned_rotate_transparent.jpg"
You can change the argument(color name) of fill method depending on the background color where you want to put the image file onto. These are original image and rotated and transparent one.
(continue to phosphorescence: specular reflection with mini_magick (2))
4 comments:
Hi there! I just want to offer you a huge thumbs up for the great information you have here on this post. I’ll be coming back to your website for more soon.
야설
This website is really a walk-through for every one of the details you wanted concerning this and also didn't know who to ask. Glimpse right here, and also you'll absolutely uncover it.
오피헌터
I'm satisfied, I must claim. Truly seldom do I run into a blog that's both educative as well as enjoyable, and let me tell you, you have struck the nail on the head. Your concept is impressive; the issue is something that inadequate individuals are speaking smartly about. I am very happy that I came across this in my search for something relating to this.
마사지블루
I was extremely pleased to find this page. I need to to thank you for ones time for this particularly fantastic read!! I definitely enjoyed every little bit of it and I have you book-marked to check out new information in your blog.
건마탑
Post a Comment