%
% PolaroidImage() simulates a Polaroid picture.
%
-% The format of the AnnotateImage method is:
+% The format of the PolaroidImage method is:
%
% Image *PolaroidImage(const Image *image,const DrawInfo *draw_info,
% const char *caption,const double angle,
*interpret_text;
register char
- *q; /* current position in interpret_text */
+ *q; /* current position in interpret_text */
register const char
- *p; /* position in embed_text string being expanded */
+ *p; /* position in embed_text string being expanded */
size_t
- extent; /* allocated length of interpret_text */
+ extent; /* allocated length of interpret_text */
MagickBooleanType
number;
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s","no-image");
if (embed_text == (const char *) NULL)
- return((char *) NULL);
+ return(ConstantString(""));
p=embed_text;
if (*p == '\0')
return(ConstantString(""));
- /* handle a '@' replace string from file */
- if (*p == '@') {
- p++;
- if (*p != '-' && IfMagickFalse(IsPathAccessible(p)) ) {
- (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
- "UnableToAccessPath","%s",p);
- return((char *) NULL);
- }
- return(FileToString(p,~0UL,exception));
- }
+ if ((*p == '@') && (IsPathAccessible(p+1) != MagickFalse))
+ {
+ /* handle a '@' replace string from file */
+ interpret_text=FileToString(p+1,~0UL,exception);
+ if (interpret_text != (char *) NULL)
+ return(interpret_text);
+ }
/*
Translate any embedded format characters.