Is there a way to use the patterns built in to ImageMagick #654
Answered
by
dlemstra
cstrachan88
asked this question in
Help
-
In the past, I have used the command line to overlay patterns on images using the -size command:
You can find documentation for this here. Is there a way to access this through Magick.NET? Poking around, I don't see a way to do that currently in the documentation or through code. See also issue #3 from a few years back. |
Beta Was this translation helpful? Give feedback.
Answered by
dlemstra
Jun 4, 2020
Replies: 1 comment
-
You can use the pattern as the filename in the constructor of a using (var image = new MagickImage("pattern:RIGHT45", 64, 64))
{
image.Write("output.png");
} And for the second command you will need to use a using (var images = new MagickImageCollection())
{
images.Add(new MagickImage("img.png"));
var right = new MagickImage("pattern:RIGHT45", 64, 64);
right.Transparent(MagickColors.White);
images.Add(right);
using (var output = images.Flatten())
{
output.Write("output.png");
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cstrachan88
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the pattern as the filename in the constructor of a
MagickImage
:And for the second command you will need to use a
MagickImageCollection
: