Improper rotation while overlaying image
Hi,
I am seeing an erratic behaviour while applying rotation to an overlayed image.
Below are two URLs representing this behaviour :
Without rotation :
With rotation :
The image with rotation has the overlayed object smaller than the one without rotation. Also the image after rotation seems to have an extra padding on the edges (possibly because default rotation would result in the overlayed image overflowing beyond the image boundaries?)
If possible, please explain this behaviour since right now we are unable to rotate and set overlayed images according to the parameters we are sending.
Thanks,
Vijay Keswani
-
Hi Vijay,
Thank you for reaching out!
Differences between those images happen because you have width (or height) on the same component as a_ (angle), As a result the bounding box is forced to 190, causing the a_-45 image to look smaller than the a_0 one.
You can use the angle after creating the width and decide the location. For example:
Hopes that helps. Thank you for a great question!
Shirly
0 -
Hi Shirly,
In the attached image
the co-ordinates provided are x_0, y_0 but the image is still not on the edge.
The main concern for us is that we were expecting that with these co-ordinates the image after rotation would be on the boundary. Can you tell us how that achieve that?
Vijay
0 -
Hi Vijay,
In the attached image:It puts the overlay 4% to the left relative to its bounding box (which is centered on the northwest).
Few things to note:
1. Thex
parameter is applied to the layer, and not the image overlay itself.
2. Theno_overflow
flag is used to eliminate the canvas extension that is caused when moving the overlay
3. This percentage would change for different images. as the northwest center would be different for each image.Let me know if you need anything else
Shirly
0 -
Hi Vijay,
A different way to solve it is by using e_trim
Adding e_trim will remove the extra spacing from the coudinary_icon image.
for more information please check the effect reference here.
Please let me know if you have any further questions,
Shirly
0
Post is closed for comments.
Comments
4 comments