Composite image with rotation #1204
Unanswered
CommanderAlchemy
asked this question in
Help
Replies: 3 comments 4 replies
-
Can you share the two images? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I haven't had time to check this yet. |
Beta Was this translation helpful? Give feedback.
0 replies
-
There is no build-in way to do this inside ImageMagick you will be forced to do the math yourself: var angle = 45;
var radians = Math.PI * 45 / 180.0;
var offset = dropImage.Height * Math.Sin(radians);
dropImage.BackgroundColor = MagickColors.Transparent;
dropImage.Rotate(angle);
var position = new PointD(drop.GetXCoordinate() - offset, drop.GetYCoordinate());
baseImage.Composite(dropImage, position, CompositeOperator.SrcOver); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying currently to add image onto another with x and y coordinates and rotation.
w/ followng code:
This will cause a bounding box around the image, causing my original
x
andy
coordinates being off from my original image.How can I rotate and also keep the coordinates so that I can place the image correctly on top the background image.
I've seen examples of using args, but cannot seem to make it do anything.
Beta Was this translation helpful? Give feedback.
All reactions