ImageMagick: MagickCore, C API for ImageMagick: Annotate an Image
Author: ImageMagick Studio LLC
Description: ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves. ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you can freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or you can use the features from programs written in your favorite programming language. Choose from these interfaces: MagickCore (C), MagickWand (C), ChMagick (Ch), Magick++ (C++), JMagick (Java), L-Magick (Lisp), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (P [cell cut: 1167 characters, first 1000 kept]
Keywords: magickcore, c, api, for, imagemagick:, annotate, an, image, ImageMagick, ImageMagic, MagickCore, MagickWand, PerlMagick, Magick++, RMagick, PythonMagick, JMagick, TclMagick, Image, Magick, Magic, Wand

## AnnotateImage AnnotateImage() annotates an image with text. Optionally you can include any of the following bits of information about the image by embedding the appropriate special characters:
          b   file size in bytes.
          c   comment.
          d   directory in which the image resides.
          e   extension of the image file.
          f   original filename of the image.
          h   height of image.
          i   filename of the image.
          k   number of unique colors.
          l   image label.
          m   image file format.
          n   number of images in a image sequence.
          o   output image filename.
          p   page number of the image.
          q   image depth (8 or 16).
          p   page number of the image.
          q   image depth (8 or 16).
          s   image scene number.
          t   image filename without any extension.
          u   a unique temporary filename.
          w   image width.
          x   x resolution of the image.
          y   y resolution of the image.
The format of the AnnotateImage method is:
      MagickBooleanType AnnotateImage(Image *image,DrawInfo *draw_info)
A description of each parameter follows: ##### image The image. ##### draw_info The draw info. ## FormatMagickCaption FormatMagickCaption() formats a caption so that it fits within the image width. It returns the number of lines in the formatted caption. The format of the FormatMagickCaption method is:
      long FormatMagickCaption(Image *image,DrawInfo *draw_info,char *caption,
        TypeMetric *metrics)
A description of each parameter follows. ##### image The image. ##### draw_info The draw info. ##### metrics Return the font metrics in this structure. ## GetMultilineTypeMetrics GetMultilineTypeMetrics() returns the following information for the specified font and text:
          character width
          character height
          ascent
          descent
          text width
          text height
          maximum horizontal advance
          underline position
          underline thickness
This method is like GetTypeMetrics() but it returns the maximum text width and height for multiple lines of text. The format of the GetMultilineTypeMetrics method is:
      MagickBooleanType GetMultilineTypeMetrics(Image *image,
        const DrawInfo *draw_info,TypeMetric *metrics)
A description of each parameter follows: ##### image The image. ##### draw_info The draw info. ##### metrics Return the font metrics in this structure. ## GetTypeMetrics GetTypeMetrics() returns the following information for the specified font and text:
          character width
          character height
          ascent
          descent
          text width
          text height
          maximum horizontal advance
          underline position
          underline thickness
The format of the GetTypeMetrics method is:
      MagickBooleanType GetTypeMetrics(Image *image,const DrawInfo *draw_info,
        TypeMetric *metrics)
A description of each parameter follows: ##### image The image. ##### draw_info The draw info. ##### metrics Return the font metrics in this structure. |

Discourse Server • Mailing Lists • ImageMagick Studio