At the beginning, I download a photo of design and change its scale to the size of the cup without handle(I think I should do it). Then I will supplement the background, changing the size of the image to 1234x1526.
Code: Select all
MiniMagick::Tool::Convert.new do |convert|
convert << "C:/Users/Administrator.SERVER/Desktop/ruby/-B-.png"
convert << "-resize"
convert << "1234x1526"
convert << "-gravity"
convert << "center"
convert << "-extent"
convert << "1234x1526"
convert << "output.jpg"
end
And finally, with the help of these commands, i would do cylindrize on alien. But no idea how to setup that, What i should change too look good.
http://www.imagemagick.org/Usage/mappin ... rtion_maps -->>> Cylindrical Displacement
Code: Select all
convert ^
output.jpg -background black -gravity south -splice 0x8 ^
( +clone -sparse-color barycentric "0,0 black 1234,0 white" ) ^
( +clone -function arcsin 0.5 ) ^
( -clone 1 -level 25%%,75%% ^
-function polynomial -4,4,0 -gamma 2 ^
+level 50%%,0 ) ^
-delete 1 ^
-virtual-pixel black -compose displace -define compose:args=142x54 -composite ^
outputMug.png
I'm currently using photoshop and smart objects for this process, but it can not be done on linux (the company uses amazon ec2)
Meaby that image from photshop will help to visualize that
I will buy big beer for help Sorry for my english.