Creating image with label text
Posted: 2018-05-07T08:13:52-07:00
Is there some sample c# code that uses Magich.Net to create an image using the label option (I want to put text on the image) so I can take advantage the sizing options?
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=33984
Code: Select all
using (MagickImage image = new MagickImage())
{
MagickReadSettings settings = new MagickReadSettings()
{
BackgroundColor = MagickColors.LightBlue, // -background lightblue
FillColor = MagickColors.Black, // -fill black
Font = "Arial", // -font Arial
Width = 530, // -size 530x
Height = 175 // -size x175
};
image.Read("caption:This is a test.", settings); // caption:"This is a test."
image.Write("caption_long_en.png"); // caption_long_en.png
}