Hi, everybody! I love the reflection effect so much.
Please look at the screenshot here: http://img12.imageshack.us/my.php?image ... oncopy.png. Follow the instructions here http://www.imagemagick.org/Usage/advanced/#reflections, I can create a reflection like figure 1. Now I want a to create a reflection like figure 2 but I don't know how to do that, any suggestions? Thanks.
More about reflection
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: More about reflection
Create the reflection as you did for image 1, the distort the result, as a single unit! Use SRT, Affine, or Perspective!
I mention this method in the reflection examples....
I mention this method in the reflection examples....
Just append the reflection to the source image first, then distort the source image as if it has no reflection attached, letting its reflection distort along with the main image...
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: More about reflection
Thanks so much for your precious reply!
Follow your instruction, we must distort the source image. But for this image (a .png file with a transparent background): http://img268.imageshack.us/my.php?imag ... ctiont.png, if we distort the source image, the result is wrong, I think. What can I do to have a right result in this case?
Many thanks!
Follow your instruction, we must distort the source image. But for this image (a .png file with a transparent background): http://img268.imageshack.us/my.php?imag ... ctiont.png, if we distort the source image, the result is wrong, I think. What can I do to have a right result in this case?
Many thanks!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: More about reflection
I can see your problem. Tricky. You basically can not just simply 'flip' the image.
You just need to use affine to create the reflection image that 'flips' along the line of the feet.
Look at the affine using arrows distortion example
http://www.imagemagick.org/Usage/distorts/#affine
For your image your control arrows goes from from the first foot to the second, The other arrow from the first foot straight up (any distance). that gives you your three points for affine distortion.
For reflection the upward arrow goes downward by the same length while the other 'ground' arrow does not change (only one control point changes). That will 'flip' the reflects correctly for that image.
You just need to use affine to create the reflection image that 'flips' along the line of the feet.
Look at the affine using arrows distortion example
http://www.imagemagick.org/Usage/distorts/#affine
For your image your control arrows goes from from the first foot to the second, The other arrow from the first foot straight up (any distance). that gives you your three points for affine distortion.
For reflection the upward arrow goes downward by the same length while the other 'ground' arrow does not change (only one control point changes). That will 'flip' the reflects correctly for that image.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: More about reflection
Thanks, Anthony!
I'm trying. I must say it takes me too long to define points for control arrows for an image and this is the problem. Unlike the other reflection types, I have to redefine points for each image for this reflection type. I have too many images, so I wonder if there is another way to achieve this? Thanks a lot!
I'm trying. I must say it takes me too long to define points for control arrows for an image and this is the problem. Unlike the other reflection types, I have to redefine points for each image for this reflection type. I have too many images, so I wonder if there is another way to achieve this? Thanks a lot!
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: More about reflection
The other way would be to automate the selection of the 'fixed' control points.
Perhaps the 'best' fit of a sloped line to the image.
Perhaps the 'best' fit of a sloped line to the image.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/