From: Dirk Lemstra Date: Fri, 12 Jul 2019 08:36:52 +0000 (+0200) Subject: Some more refactoring. X-Git-Tag: 7.0.8-54~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3dedcc4b7350c5ac7e6b5bdb2b03e3b4830cb392;p=imagemagick Some more refactoring. --- diff --git a/coders/ps.c b/coders/ps.c index 5e98b3580..04c72a6d5 100644 --- a/coders/ps.c +++ b/coders/ps.c @@ -291,11 +291,20 @@ static void ReadPSInfo(const ImageInfo *image_info,Image *image, buffer.image=image; for (c=ReadByteBuffer(&buffer); c != EOF; c=ReadByteBuffer(&buffer)) { - if (c == '<') + switch(c) + { + case '<': { ReadGhostScriptXMPProfile(&buffer,&ps_info->xmp_profile); continue; } + case '\n': + case '\r': + case '%': + break; + default: + continue; + } /* Note document structuring comments. */