cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % CCCC AAA PPPP TTTTT IIIII OOO N N % |
| 7 | % C A A P P T I O O NN N % |
| 8 | % C AAAAA PPPP T I O O N N N % |
| 9 | % C A A P T I O O N NN % |
| 10 | % CCCC A A P T IIIII OOO N N % |
| 11 | % % |
| 12 | % % |
| 13 | % Read Text Caption. % |
| 14 | % % |
| 15 | % Software Design % |
| 16 | % John Cristy % |
| 17 | % February 2002 % |
| 18 | % % |
| 19 | % % |
cristy | 1454be7 | 2011-12-19 01:52:48 +0000 | [diff] [blame] | 20 | % Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization % |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 21 | % dedicated to making software imaging solutions freely available. % |
| 22 | % % |
| 23 | % You may not use this file except in compliance with the License. You may % |
| 24 | % obtain a copy of the License at % |
| 25 | % % |
| 26 | % http://www.imagemagick.org/script/license.php % |
| 27 | % % |
| 28 | % Unless required by applicable law or agreed to in writing, software % |
| 29 | % distributed under the License is distributed on an "AS IS" BASIS, % |
| 30 | % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % |
| 31 | % See the License for the specific language governing permissions and % |
| 32 | % limitations under the License. % |
| 33 | % % |
| 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 35 | % |
| 36 | % |
| 37 | */ |
| 38 | |
| 39 | /* |
| 40 | Include declarations. |
| 41 | */ |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 42 | #include "MagickCore/studio.h" |
| 43 | #include "MagickCore/annotate.h" |
| 44 | #include "MagickCore/blob.h" |
| 45 | #include "MagickCore/blob-private.h" |
cristy | 8a3ce7f | 2011-10-30 02:28:03 +0000 | [diff] [blame] | 46 | #include "MagickCore/composite-private.h" |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 47 | #include "MagickCore/draw.h" |
cristy | 8a3ce7f | 2011-10-30 02:28:03 +0000 | [diff] [blame] | 48 | #include "MagickCore/draw-private.h" |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 49 | #include "MagickCore/exception.h" |
| 50 | #include "MagickCore/exception-private.h" |
| 51 | #include "MagickCore/image.h" |
| 52 | #include "MagickCore/image-private.h" |
| 53 | #include "MagickCore/list.h" |
| 54 | #include "MagickCore/magick.h" |
| 55 | #include "MagickCore/memory_.h" |
cristy | 8a3ce7f | 2011-10-30 02:28:03 +0000 | [diff] [blame] | 56 | #include "MagickCore/module.h" |
cristy | 4c08aed | 2011-07-01 19:47:50 +0000 | [diff] [blame] | 57 | #include "MagickCore/option.h" |
| 58 | #include "MagickCore/property.h" |
| 59 | #include "MagickCore/quantum-private.h" |
| 60 | #include "MagickCore/static.h" |
| 61 | #include "MagickCore/string_.h" |
cristy | 8a3ce7f | 2011-10-30 02:28:03 +0000 | [diff] [blame] | 62 | #include "MagickCore/string-private.h" |
| 63 | #include "MagickCore/utility.h" |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 64 | |
| 65 | /* |
| 66 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 67 | % % |
| 68 | % % |
| 69 | % % |
| 70 | % R e a d C A P T I O N I m a g e % |
| 71 | % % |
| 72 | % % |
| 73 | % % |
| 74 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 75 | % |
| 76 | % ReadCAPTIONImage() reads a CAPTION image file and returns it. It |
| 77 | % allocates the memory necessary for the new Image structure and returns a |
| 78 | % pointer to the new image. |
| 79 | % |
| 80 | % The format of the ReadCAPTIONImage method is: |
| 81 | % |
| 82 | % Image *ReadCAPTIONImage(const ImageInfo *image_info, |
| 83 | % ExceptionInfo *exception) |
| 84 | % |
| 85 | % A description of each parameter follows: |
| 86 | % |
| 87 | % o image_info: the image info. |
| 88 | % |
| 89 | % o exception: return any errors or warnings in this structure. |
| 90 | % |
| 91 | */ |
| 92 | static Image *ReadCAPTIONImage(const ImageInfo *image_info, |
| 93 | ExceptionInfo *exception) |
| 94 | { |
| 95 | char |
| 96 | *caption, |
| 97 | geometry[MaxTextExtent], |
| 98 | *property; |
| 99 | |
| 100 | const char |
cristy | ab272ac | 2012-03-04 22:08:07 +0000 | [diff] [blame] | 101 | *gravity, |
| 102 | *option; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 103 | |
| 104 | DrawInfo |
| 105 | *draw_info; |
| 106 | |
| 107 | Image |
| 108 | *image; |
| 109 | |
| 110 | MagickBooleanType |
| 111 | status; |
| 112 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 113 | register ssize_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 114 | i; |
| 115 | |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 116 | size_t |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 117 | height, |
| 118 | width; |
| 119 | |
cristy | 4e82e51 | 2011-04-24 01:33:42 +0000 | [diff] [blame] | 120 | TypeMetric |
| 121 | metrics; |
| 122 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 123 | /* |
| 124 | Initialize Image structure. |
| 125 | */ |
| 126 | assert(image_info != (const ImageInfo *) NULL); |
| 127 | assert(image_info->signature == MagickSignature); |
| 128 | if (image_info->debug != MagickFalse) |
| 129 | (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", |
| 130 | image_info->filename); |
| 131 | assert(exception != (ExceptionInfo *) NULL); |
| 132 | assert(exception->signature == MagickSignature); |
cristy | 9950d57 | 2011-10-01 18:22:35 +0000 | [diff] [blame] | 133 | image=AcquireImage(image_info,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 134 | if (image->columns == 0) |
| 135 | ThrowReaderException(OptionError,"MustSpecifyImageSize"); |
| 136 | (void) ResetImagePage(image,"0x0+0+0"); |
| 137 | /* |
| 138 | Format caption. |
| 139 | */ |
cristy | ab272ac | 2012-03-04 22:08:07 +0000 | [diff] [blame] | 140 | option=GetImageOption(image_info,"filename"); |
| 141 | if (option == (const char *) NULL) |
| 142 | property=InterpretImageProperties(image_info,image,image_info->filename, |
| 143 | exception); |
| 144 | else |
| 145 | if (LocaleNCompare(option,"caption:",8) == 0) |
| 146 | property=InterpretImageProperties(image_info,image,option+8,exception); |
| 147 | else |
| 148 | property=InterpretImageProperties(image_info,image,option,exception); |
cristy | d15e659 | 2011-10-15 00:13:06 +0000 | [diff] [blame] | 149 | (void) SetImageProperty(image,"caption",property,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 150 | property=DestroyString(property); |
cristy | d15e659 | 2011-10-15 00:13:06 +0000 | [diff] [blame] | 151 | caption=ConstantString(GetImageProperty(image,"caption",exception)); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 152 | draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL); |
cristy | 6fc3929 | 2011-10-23 14:26:30 +0000 | [diff] [blame] | 153 | (void) CloneString(&draw_info->text,caption); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 154 | gravity=GetImageOption(image_info,"gravity"); |
| 155 | if (gravity != (char *) NULL) |
cristy | 042ee78 | 2011-04-22 18:48:30 +0000 | [diff] [blame] | 156 | draw_info->gravity=(GravityType) ParseCommandOption(MagickGravityOptions, |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 157 | MagickFalse,gravity); |
| 158 | if ((*caption != '\0') && (image->rows != 0) && |
| 159 | (image_info->pointsize == 0.0)) |
| 160 | { |
| 161 | char |
| 162 | *text; |
| 163 | |
cristy | bdf24b2 | 2012-05-24 12:20:45 +0000 | [diff] [blame] | 164 | double |
| 165 | high, |
| 166 | low; |
| 167 | |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 168 | /* |
cristy | bdf24b2 | 2012-05-24 12:20:45 +0000 | [diff] [blame] | 169 | Auto fit text into bounding box. |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 170 | */ |
| 171 | for ( ; ; ) |
| 172 | { |
| 173 | text=AcquireString(caption); |
cristy | 39cfa8f | 2012-09-26 10:04:15 +0000 | [diff] [blame^] | 174 | i=FormatMagickCaption(image,draw_info,MagickTrue,&metrics,&text, |
cristy | 5cbc016 | 2011-08-29 00:36:28 +0000 | [diff] [blame] | 175 | exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 176 | (void) CloneString(&draw_info->text,text); |
| 177 | text=DestroyString(text); |
cristy | b51dff5 | 2011-05-19 16:55:47 +0000 | [diff] [blame] | 178 | (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 179 | -metrics.bounds.x1,metrics.ascent); |
| 180 | if (draw_info->gravity == UndefinedGravity) |
| 181 | (void) CloneString(&draw_info->geometry,geometry); |
cristy | 5cbc016 | 2011-08-29 00:36:28 +0000 | [diff] [blame] | 182 | status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); |
cristy | da16f16 | 2011-02-19 23:52:17 +0000 | [diff] [blame] | 183 | (void) status; |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 184 | width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5); |
cristy | 4e82e51 | 2011-04-24 01:33:42 +0000 | [diff] [blame] | 185 | height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5); |
cristy | 42f5a6a | 2012-05-24 01:52:18 +0000 | [diff] [blame] | 186 | if ((width > image->columns) && (height > image->rows)) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 187 | break; |
cristy | bdf24b2 | 2012-05-24 12:20:45 +0000 | [diff] [blame] | 188 | draw_info->pointsize*=2.0; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 189 | } |
cristy | bdf24b2 | 2012-05-24 12:20:45 +0000 | [diff] [blame] | 190 | high=draw_info->pointsize/2.0; |
| 191 | low=high/2.0; |
| 192 | while ((high-low) > 1.0) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 193 | { |
cristy | bdf24b2 | 2012-05-24 12:20:45 +0000 | [diff] [blame] | 194 | draw_info->pointsize=(low+high)/2.0; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 195 | text=AcquireString(caption); |
cristy | 39cfa8f | 2012-09-26 10:04:15 +0000 | [diff] [blame^] | 196 | i=FormatMagickCaption(image,draw_info,MagickTrue,&metrics,&text, |
cristy | 5cbc016 | 2011-08-29 00:36:28 +0000 | [diff] [blame] | 197 | exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 198 | (void) CloneString(&draw_info->text,text); |
| 199 | text=DestroyString(text); |
cristy | b51dff5 | 2011-05-19 16:55:47 +0000 | [diff] [blame] | 200 | (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 201 | -metrics.bounds.x1,metrics.ascent); |
| 202 | if (draw_info->gravity == UndefinedGravity) |
| 203 | (void) CloneString(&draw_info->geometry,geometry); |
cristy | 5cbc016 | 2011-08-29 00:36:28 +0000 | [diff] [blame] | 204 | status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 205 | width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5); |
cristy | 4e82e51 | 2011-04-24 01:33:42 +0000 | [diff] [blame] | 206 | height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5); |
cristy | 42f5a6a | 2012-05-24 01:52:18 +0000 | [diff] [blame] | 207 | if ((width <= image->columns) && (height <= image->rows)) |
cristy | bdf24b2 | 2012-05-24 12:20:45 +0000 | [diff] [blame] | 208 | low=draw_info->pointsize+1.0; |
| 209 | else |
| 210 | high=draw_info->pointsize-1.0; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 211 | } |
cristy | 17386ff | 2012-05-28 11:43:37 +0000 | [diff] [blame] | 212 | for (draw_info->pointsize=(low+high)/2.0; ; ) |
| 213 | { |
| 214 | text=AcquireString(caption); |
cristy | 39cfa8f | 2012-09-26 10:04:15 +0000 | [diff] [blame^] | 215 | i=FormatMagickCaption(image,draw_info,MagickTrue,&metrics,&text, |
cristy | 17386ff | 2012-05-28 11:43:37 +0000 | [diff] [blame] | 216 | exception); |
| 217 | (void) CloneString(&draw_info->text,text); |
| 218 | text=DestroyString(text); |
| 219 | (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", |
| 220 | -metrics.bounds.x1,metrics.ascent); |
| 221 | if (draw_info->gravity == UndefinedGravity) |
| 222 | (void) CloneString(&draw_info->geometry,geometry); |
| 223 | status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); |
| 224 | width=(size_t) floor(metrics.width+draw_info->stroke_width+0.5); |
| 225 | height=(size_t) floor(metrics.height+draw_info->stroke_width+0.5); |
| 226 | if ((width <= image->columns) && (height <= image->rows)) |
| 227 | break; |
| 228 | draw_info->pointsize--; |
| 229 | } |
| 230 | draw_info->pointsize=floor(draw_info->pointsize); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 231 | } |
cristy | 5cbc016 | 2011-08-29 00:36:28 +0000 | [diff] [blame] | 232 | i=FormatMagickCaption(image,draw_info,MagickTrue,&metrics,&caption,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 233 | if (image->rows == 0) |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 234 | image->rows=(size_t) ((i+1)*(metrics.ascent-metrics.descent+ |
cristy | cc2fb02 | 2011-04-01 14:08:37 +0000 | [diff] [blame] | 235 | draw_info->interline_spacing+draw_info->stroke_width)+0.5); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 236 | if (image->rows == 0) |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 237 | image->rows=(size_t) ((i+1)*draw_info->pointsize+ |
cristy | cc2fb02 | 2011-04-01 14:08:37 +0000 | [diff] [blame] | 238 | draw_info->interline_spacing+draw_info->stroke_width+0.5); |
cristy | ea1a8aa | 2011-10-20 13:24:06 +0000 | [diff] [blame] | 239 | if (SetImageBackgroundColor(image,exception) == MagickFalse) |
cristy | 95524f9 | 2010-02-16 18:44:34 +0000 | [diff] [blame] | 240 | { |
cristy | 95524f9 | 2010-02-16 18:44:34 +0000 | [diff] [blame] | 241 | image=DestroyImageList(image); |
| 242 | return((Image *) NULL); |
| 243 | } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 244 | /* |
| 245 | Draw caption. |
| 246 | */ |
| 247 | (void) CloneString(&draw_info->text,caption); |
cristy | 5cbc016 | 2011-08-29 00:36:28 +0000 | [diff] [blame] | 248 | status=GetMultilineTypeMetrics(image,draw_info,&metrics,exception); |
cristy | 024843f | 2011-06-03 17:52:52 +0000 | [diff] [blame] | 249 | if ((draw_info->gravity != UndefinedGravity) && |
| 250 | (draw_info->direction != RightToLeftDirection)) |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 251 | image->page.x=(ssize_t) (metrics.bounds.x1-draw_info->stroke_width/2.0); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 252 | else |
| 253 | { |
cristy | b51dff5 | 2011-05-19 16:55:47 +0000 | [diff] [blame] | 254 | (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 255 | -metrics.bounds.x1+draw_info->stroke_width/2.0,metrics.ascent+ |
| 256 | draw_info->stroke_width/2.0); |
cristy | 024843f | 2011-06-03 17:52:52 +0000 | [diff] [blame] | 257 | if (draw_info->direction == RightToLeftDirection) |
| 258 | (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g", |
| 259 | image->columns-(metrics.bounds.x2+draw_info->stroke_width/2.0), |
| 260 | metrics.ascent+draw_info->stroke_width/2.0); |
| 261 | draw_info->geometry=AcquireString(geometry); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 262 | } |
cristy | ab272ac | 2012-03-04 22:08:07 +0000 | [diff] [blame] | 263 | status=AnnotateImage(image,draw_info,exception); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 264 | draw_info=DestroyDrawInfo(draw_info); |
| 265 | caption=DestroyString(caption); |
cristy | ab272ac | 2012-03-04 22:08:07 +0000 | [diff] [blame] | 266 | if (status == MagickFalse) |
| 267 | { |
| 268 | image=DestroyImageList(image); |
| 269 | return((Image *) NULL); |
| 270 | } |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 271 | return(GetFirstImageInList(image)); |
| 272 | } |
| 273 | |
| 274 | /* |
| 275 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 276 | % % |
| 277 | % % |
| 278 | % % |
| 279 | % R e g i s t e r C A P T I O N I m a g e % |
| 280 | % % |
| 281 | % % |
| 282 | % % |
| 283 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 284 | % |
| 285 | % RegisterCAPTIONImage() adds attributes for the CAPTION image format to |
| 286 | % the list of supported formats. The attributes include the image format |
| 287 | % tag, a method to read and/or write the format, whether the format |
| 288 | % supports the saving of more than one frame to the same file or blob, |
| 289 | % whether the format supports native in-memory I/O, and a brief |
| 290 | % description of the format. |
| 291 | % |
| 292 | % The format of the RegisterCAPTIONImage method is: |
| 293 | % |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 294 | % size_t RegisterCAPTIONImage(void) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 295 | % |
| 296 | */ |
cristy | bb50337 | 2010-05-27 20:51:26 +0000 | [diff] [blame] | 297 | ModuleExport size_t RegisterCAPTIONImage(void) |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 298 | { |
| 299 | MagickInfo |
| 300 | *entry; |
| 301 | |
| 302 | entry=SetMagickInfo("CAPTION"); |
| 303 | entry->decoder=(DecodeImageHandler *) ReadCAPTIONImage; |
cristy | 8a3ce7f | 2011-10-30 02:28:03 +0000 | [diff] [blame] | 304 | entry->description=ConstantString("Caption"); |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 305 | entry->adjoin=MagickFalse; |
cristy | 3ed852e | 2009-09-05 21:47:34 +0000 | [diff] [blame] | 306 | entry->module=ConstantString("CAPTION"); |
| 307 | (void) RegisterMagickInfo(entry); |
| 308 | return(MagickImageCoderSignature); |
| 309 | } |
| 310 | |
| 311 | /* |
| 312 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 313 | % % |
| 314 | % % |
| 315 | % % |
| 316 | % U n r e g i s t e r C A P T I O N I m a g e % |
| 317 | % % |
| 318 | % % |
| 319 | % % |
| 320 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 321 | % |
| 322 | % UnregisterCAPTIONImage() removes format registrations made by the |
| 323 | % CAPTION module from the list of supported formats. |
| 324 | % |
| 325 | % The format of the UnregisterCAPTIONImage method is: |
| 326 | % |
| 327 | % UnregisterCAPTIONImage(void) |
| 328 | % |
| 329 | */ |
| 330 | ModuleExport void UnregisterCAPTIONImage(void) |
| 331 | { |
| 332 | (void) UnregisterMagickInfo("CAPTION"); |
| 333 | } |