Convert Text to Image
When generating and manipulating images, one of the primary tasks a developer may be required to undertake is adding a text string into an image. This seemingly simple exercise can get pretty complicated and extremely frustrating.
Some of the complicating factors that can cause this to be such a painful experience are:
- The text might include different font settings, such as typeface, size, bold, italics, etc.
- There may be a need to work with other font types than TrueType fonts.
- Determining the width and height that a particular text string will generate is difficult.
- Text may need to be added to multiple locations in an image.
- The text may be a single line, or several lines with different alignment.
- While .NET tools support the addition of text on RGB images, this will not help an unfortunate developer who is working with a CMYK image.
- Individual characters in a text string may need to have their location specified.
- Artistic effects such as outlining or shadowing each character may be desired.
Luckily Graphics Mill provides everything needed for a developer to add to and manipulate text in an image with ease. The difference between the standard System.Drawing text output and the output for ASP.NET apps using Graphics Mill are crystal clear:
- Graphics Mill allows developers to work with TrueType fonts, but it also allows the use of OpenType and other fonts when adding text to an image or converting existing text within the image.
- Using the font settings and a text string, you can quickly and painlessly measure text size in your ASP.NET app.
- Character heights and character distance from the font baseline are just two of the many font metrics that can be determined using Graphics Mill when adding text to an image or converting existing text within an image.
- Not only text strings but impressive multiline text with text justification and line breaks can be drawn in your ASP.NET app.
- Precise configuration of a text string’s output is possible in ASP.NET apps, up to and including the configuration of the distance between each character in a text string.
- Developers can not only add text into raster images, but also display the text in vector form. In other words, when adding text to an image it can be presented in a set of lines and curves. This allows extensive transformation of the text’s appearance. It can even be outlined or morphed!
Whether developers need to add a simple text string to an image or convert complex text structures in an image, Graphics Mill’s ASP.NET app configurations are here to help!