
I want to display some of photos inside the lens.
I can do this in photoshop. But i am not able to find a proper way to do this in imagemagick.
Please tell me how to do
Code: Select all
convert lens.jpg -fuzz 5% -fill none -draw "matte 50,50 floodfill" magnifier.png
Code: Select all
convert rose: -resize 180x180! rose.png
Code: Select all
convert rose.png magnifier.png -compose over -composite result.png
Code: Select all
convert -size 180x180 xc:black \( rose: -resize 90x90^ \) -compose over -composite rose2.png
Code: Select all
convert rose2.png magnifier.png -compose over -composite result2.png
That is what I have done in the result.png images. I made the circle of the magnifier transparent. Then I put the rose image behind this image so that is shows inside the magnifier circle.agriz wrote:Can we just find and replace the white place in this magnifier with another image?
Code: Select all
convert lens.jpg rose2.png \( magnifier.png -alpha extract -negate \) -compose over -composite result3.png
Code: Select all
exec($im."\convert my_room.jpg -resize x115 ( +clone -threshold -1 -negate -fill white -draw \"circle 55,55 55,0\" ) -alpha off -compose copy_opacity -composite my_room_mini.png");
Code: Select all
-resize x115
Code: Select all
-resize x110
Code: Select all
convert my_room.jpg -resize x115 ( +clone -threshold -1 -negate -fill white -draw \"circle 55,55 55,0\" ) -alpha off -compose copy_opacity -composite my_room_mini.png
convert my_family_photo.jpg my_room_mini.png -geometry +0+0 -composite family_room.jpg
Code: Select all
convert my_room.jpg -resize x115 ^
( +clone -threshold -1 -negate -fill white -draw \"circle 55,55 55,0\" ) ^
-alpha off -compose copy_opacity -composite ^
my_family_photo.jpg +swap -compose over -composite family_room.jpg
Code: Select all
convert lens.jpg -fuzz 5% -fill none -draw "matte 50,50 floodfill" \
-alpha extract -blur 0x1 -level 50x100% mask_inner.png
color=`convert lens.jpg -format "%[pixel:u.p{0,0}]" info:`
convert lens.jpg \
\( -clone 0 -bordercolor "$color" -border 5 -fuzz 5% -fill none \
-draw "matte 0,0 floodfill" -alpha extract -shave 5x5 -blur 0x1 -level 0x50% \) \
-alpha off -compose copy_opacity -composite lens_outer.png
convert rose.jpg -resize 109x109^ -gravity center -extent 109x109 -crop 109x109+0+0 rose_cropped.png
convert rose_cropped.png \( mask_inner.png -negate \) -alpha off -compose copy_opacity -composite rose_cropped_trans.png
convert lens_outer.png rose_cropped_trans.png -compose over -composite x: