Changeset 130
- Timestamp:
- 09/15/09 18:01:10 (6 months ago)
- Files:
-
- 1 modified
-
ImageMagick/trunk/coders/msl.c (modified) (237 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ImageMagick/trunk/coders/msl.c
r117 r130 153 153 static MagickBooleanType 154 154 WriteMSLImage(const ImageInfo *,Image *); 155 156 static MagickBooleanType 157 SetMSLAttributes(MSLInfo *,const xmlChar **); 155 158 #endif 156 159 157 160 #if defined(MAGICKCORE_XML_DELEGATE) 161 158 162 /* 159 163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 181 185 % o exception: return any errors or warnings in this structure. 182 186 % 183 %184 187 */ 185 188 … … 240 243 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 241 244 " SAX.internalSubset(%s %s %s)",name, 242 (external_id != (const xmlChar *) NULL ? (c har *) external_id : " "),243 (system_id != (const xmlChar *) NULL ? (c har *) system_id : " "));245 (external_id != (const xmlChar *) NULL ? (const char *) external_id : " "), 246 (system_id != (const xmlChar *) NULL ? (const char *) system_id : " ")); 244 247 msl_info=(MSLInfo *) context; 245 248 (void) xmlCreateIntSubset(msl_info->document,name,external_id,system_id); … … 263 266 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 264 267 " SAX.resolveEntity(%s, %s)", 265 (public_id != (const xmlChar *) NULL ? (c har *) public_id : "none"),266 (system_id != (const xmlChar *) NULL ? (c har *) system_id : "none"));268 (public_id != (const xmlChar *) NULL ? (const char *) public_id : "none"), 269 (system_id != (const xmlChar *) NULL ? (const char *) system_id : "none")); 267 270 msl_info=(MSLInfo *) context; 268 271 stream=xmlLoadExternalEntity((const char *) system_id,(const char *) … … 280 283 */ 281 284 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 282 " SAX.MSLGetEntity(%s)",(c har *) name);285 " SAX.MSLGetEntity(%s)",(const char *) name); 283 286 msl_info=(MSLInfo *) context; 284 287 return(xmlGetDocEntity(msl_info->document,name)); … … 294 297 */ 295 298 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 296 " SAX.getParameterEntity(%s)",(c har *) name);299 " SAX.getParameterEntity(%s)",(const char *) name); 297 300 msl_info=(MSLInfo *) context; 298 301 return(xmlGetParameterEntity(msl_info->document,name)); … … 310 313 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 311 314 " SAX.entityDecl(%s, %d, %s, %s, %s)",name,type, 312 public_id != (const xmlChar *) NULL ? (char *) public_id : "none", 313 system_id != (const xmlChar *) NULL ? (char *) system_id : "none",content); 315 public_id != (const xmlChar *) NULL ? (const char *) public_id : "none", 316 system_id != (const xmlChar *) NULL ? (const char *) system_id : "none", 317 content); 314 318 msl_info=(MSLInfo *) context; 315 319 if (msl_info->parser->inSubset == 1) … … 401 405 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 402 406 " SAX.notationDecl(%s, %s, %s)",name, 403 public_id != (const xmlChar *) NULL ? (c har *) public_id : "none",404 system_id != (const xmlChar *) NULL ? (c har *) system_id : "none");407 public_id != (const xmlChar *) NULL ? (const char *) public_id : "none", 408 system_id != (const xmlChar *) NULL ? (const char *) system_id : "none"); 405 409 msl_info=(MSLInfo *) context; 406 410 parser=msl_info->parser; … … 425 429 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 426 430 " SAX.unparsedEntityDecl(%s, %s, %s, %s)",name, 427 public_id != (const xmlChar *) NULL ? (char *) public_id : "none", 428 system_id != (const xmlChar *) NULL ? (char *) system_id : "none",notation); 431 public_id != (const xmlChar *) NULL ? (const char *) public_id : "none", 432 system_id != (const xmlChar *) NULL ? (const char *) system_id : "none", 433 notation); 429 434 msl_info=(MSLInfo *) context; 430 435 (void) xmlAddDocEntity(msl_info->document,name, … … 609 614 case 'a': 610 615 { 611 if (LocaleCompare((c har *) tag,"add-noise") == 0)616 if (LocaleCompare((const char *) tag,"add-noise") == 0) 612 617 { 613 618 Image … … 622 627 if (msl_info->image[n] == (Image *) NULL) 623 628 { 624 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 629 ThrowMSLException(OptionError,"NoImagesDefined", 630 (const char *) tag); 625 631 break; 626 632 } … … 631 637 keyword=(const char *) attributes[i++]; 632 638 attribute=InterpretImageProperties(msl_info->image_info[n], 633 msl_info->attributes[n],(c har *) attributes[i]);639 msl_info->attributes[n],(const char *) attributes[i]); 634 640 CloneString(&value,attribute); 635 641 switch (*keyword) … … 684 690 break; 685 691 } 686 if (LocaleCompare((c har *) tag,"annotate") == 0)692 if (LocaleCompare((const char *) tag,"annotate") == 0) 687 693 { 688 694 char … … 694 700 if (msl_info->image[n] == (Image *) NULL) 695 701 { 696 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 702 ThrowMSLException(OptionError,"NoImagesDefined", 703 (const char *) tag); 697 704 break; 698 705 } … … 707 714 keyword=(const char *) attributes[i++]; 708 715 attribute=InterpretImageProperties(msl_info->image_info[n], 709 msl_info->attributes[n],(c har *) attributes[i]);716 msl_info->attributes[n],(const char *) attributes[i]); 710 717 CloneString(&value,attribute); 711 718 switch (*keyword) … … 1017 1024 break; 1018 1025 } 1019 if (LocaleCompare((c har *) tag,"append") == 0)1026 if (LocaleCompare((const char *) tag,"append") == 0) 1020 1027 { 1021 1028 Image … … 1024 1031 MagickBooleanType 1025 1032 stack; 1026 1033 1027 1034 if (msl_info->image[n] == (Image *) NULL) 1028 1035 { 1029 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1036 ThrowMSLException(OptionError,"NoImagesDefined", 1037 (const char *) tag); 1030 1038 break; 1031 1039 } … … 1036 1044 keyword=(const char *) attributes[i++]; 1037 1045 attribute=InterpretImageProperties(msl_info->image_info[n], 1038 msl_info->attributes[n],(c har *) attributes[i]);1046 msl_info->attributes[n],(const char *) attributes[i]); 1039 1047 CloneString(&value,attribute); 1040 1048 switch (*keyword) … … 1079 1087 case 'b': 1080 1088 { 1081 if (LocaleCompare((c har *) tag,"blur") == 0)1089 if (LocaleCompare((const char *) tag,"blur") == 0) 1082 1090 { 1083 1091 Image … … 1089 1097 if (msl_info->image[n] == (Image *) NULL) 1090 1098 { 1091 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1099 ThrowMSLException(OptionError,"NoImagesDefined", 1100 (const char *) tag); 1092 1101 break; 1093 1102 } … … 1097 1106 keyword=(const char *) attributes[i++]; 1098 1107 attribute=InterpretImageProperties(msl_info->image_info[n], 1099 msl_info->attributes[n],(c har *) attributes[i]);1108 msl_info->attributes[n],(const char *) attributes[i]); 1100 1109 CloneString(&value,attribute); 1101 1110 switch (*keyword) … … 1172 1181 break; 1173 1182 } 1174 if (LocaleCompare((c har *) tag,"border") == 0)1183 if (LocaleCompare((const char *) tag,"border") == 0) 1175 1184 { 1176 1185 Image … … 1182 1191 if (msl_info->image[n] == (Image *) NULL) 1183 1192 { 1184 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1193 ThrowMSLException(OptionError,"NoImagesDefined", 1194 (const char *) tag); 1185 1195 break; 1186 1196 } … … 1191 1201 keyword=(const char *) attributes[i++]; 1192 1202 attribute=InterpretImageProperties(msl_info->image_info[n], 1193 msl_info->attributes[n],(c har *) attributes[i]);1203 msl_info->attributes[n],(const char *) attributes[i]); 1194 1204 CloneString(&value,attribute); 1195 1205 switch (*keyword) … … 1285 1295 case 'c': 1286 1296 { 1287 if (LocaleCompare((c har *) tag,"colorize") == 0)1297 if (LocaleCompare((const char *) tag,"colorize") == 0) 1288 1298 { 1289 1299 char … … 1301 1311 if (msl_info->image[n] == (Image *) NULL) 1302 1312 { 1303 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1313 ThrowMSLException(OptionError,"NoImagesDefined", 1314 (const char *) tag); 1304 1315 break; 1305 1316 } … … 1311 1322 keyword=(const char *) attributes[i++]; 1312 1323 attribute=InterpretImageProperties(msl_info->image_info[n], 1313 msl_info->attributes[n],(c har *) attributes[i]);1324 msl_info->attributes[n],(const char *) attributes[i]); 1314 1325 CloneString(&value,attribute); 1315 1326 switch (*keyword) … … 1356 1367 break; 1357 1368 } 1358 if (LocaleCompare((c har *) tag, "charcoal") == 0)1369 if (LocaleCompare((const char *) tag, "charcoal") == 0) 1359 1370 { 1360 1371 double radius = 0.0, … … 1363 1374 if (msl_info->image[n] == (Image *) NULL) 1364 1375 { 1365 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1376 ThrowMSLException(OptionError,"NoImagesDefined", 1377 (const char *) tag); 1366 1378 break; 1367 1379 } … … 1375 1387 keyword=(const char *) attributes[i++]; 1376 1388 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 1377 msl_info->attributes[n],(c har *) attributes[i]));1389 msl_info->attributes[n],(const char *) attributes[i])); 1378 1390 switch (*keyword) 1379 1391 { … … 1425 1437 } 1426 1438 } 1427 if (LocaleCompare((c har *) tag,"chop") == 0)1439 if (LocaleCompare((const char *) tag,"chop") == 0) 1428 1440 { 1429 1441 Image … … 1435 1447 if (msl_info->image[n] == (Image *) NULL) 1436 1448 { 1437 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1449 ThrowMSLException(OptionError,"NoImagesDefined", 1450 (const char *) tag); 1438 1451 break; 1439 1452 } … … 1444 1457 keyword=(const char *) attributes[i++]; 1445 1458 attribute=InterpretImageProperties(msl_info->image_info[n], 1446 msl_info->attributes[n],(c har *) attributes[i]);1459 msl_info->attributes[n],(const char *) attributes[i]); 1447 1460 CloneString(&value,attribute); 1448 1461 switch (*keyword) … … 1527 1540 break; 1528 1541 } 1529 if (LocaleCompare((c har *) tag,"color-floodfill") == 0)1542 if (LocaleCompare((const char *) tag,"color-floodfill") == 0) 1530 1543 { 1531 1544 PaintMethod … … 1540 1553 if (msl_info->image[n] == (Image *) NULL) 1541 1554 { 1542 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1555 ThrowMSLException(OptionError,"NoImagesDefined", 1556 (const char *) tag); 1543 1557 break; 1544 1558 } … … 1552 1566 keyword=(const char *) attributes[i++]; 1553 1567 attribute=InterpretImageProperties(msl_info->image_info[n], 1554 msl_info->attributes[n],(c har *) attributes[i]);1568 msl_info->attributes[n],(const char *) attributes[i]); 1555 1569 CloneString(&value,attribute); 1556 1570 switch (*keyword) … … 1646 1660 break; 1647 1661 } 1648 if (LocaleCompare((c har *) tag,"comment") == 0)1662 if (LocaleCompare((const char *) tag,"comment") == 0) 1649 1663 break; 1650 if (LocaleCompare((c har *) tag,"composite") == 0)1664 if (LocaleCompare((const char *) tag,"composite") == 0) 1651 1665 { 1652 1666 char … … 1668 1682 if (msl_info->image[n] == (Image *) NULL) 1669 1683 { 1670 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 1684 ThrowMSLException(OptionError,"NoImagesDefined", 1685 (const char *) tag); 1671 1686 break; 1672 1687 } … … 1678 1693 keyword=(const char *) attributes[i++]; 1679 1694 attribute=InterpretImageProperties(msl_info->image_info[n], 1680 msl_info->attributes[n],(c har *) attributes[i]);1695 msl_info->attributes[n],(const char *) attributes[i]); 1681 1696 CloneString(&value,attribute); 1682 1697 switch (*keyword) … … 1705 1720 const char 1706 1721 *attribute; 1707 1722 1708 1723 attribute=GetImageProperty(msl_info->attributes[j],"id"); 1709 1724 if ((attribute != (const char *) NULL) && … … 1730 1745 keyword=(const char *) attributes[i++]; 1731 1746 attribute=InterpretImageProperties(msl_info->image_info[n], 1732 msl_info->attributes[n],(c har *) attributes[i]);1747 msl_info->attributes[n],(const char *) attributes[i]); 1733 1748 CloneString(&value,attribute); 1734 1749 switch (*keyword) … … 1838 1853 opacity, 1839 1854 y; 1840 1855 1841 1856 register long 1842 1857 x; 1843 1858 1844 1859 register PixelPacket 1845 1860 *q; 1846 1861 1847 1862 CacheView 1848 1863 *composite_view; … … 1851 1866 if (compose != DissolveCompositeOp) 1852 1867 { 1853 (void) SetImageOpacity(composite_image,(Quantum) opacity); 1868 (void) SetImageOpacity(composite_image,(Quantum) 1869 opacity); 1854 1870 break; 1855 1871 } … … 1860 1876 composite_view=AcquireCacheView(composite_image); 1861 1877 for (y=0; y < (long) composite_image->rows ; y++) 1862 { 1878 { 1863 1879 q=GetCacheViewAuthenticPixels(composite_view,0,y,(long) 1864 1880 composite_image->columns,1,&exception); 1865 1881 for (x=0; x < (long) composite_image->columns; x++) 1866 { 1882 { 1867 1883 if (q->opacity == OpaqueOpacity) 1868 1884 q->opacity=RoundToQuantum(opacity); … … 1993 2009 break; 1994 2010 } 1995 if (LocaleCompare((c har *) tag,"contrast") == 0)2011 if (LocaleCompare((const char *) tag,"contrast") == 0) 1996 2012 { 1997 2013 MagickBooleanType … … 2003 2019 if (msl_info->image[n] == (Image *) NULL) 2004 2020 { 2005 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2021 ThrowMSLException(OptionError,"NoImagesDefined", 2022 (const char *) tag); 2006 2023 break; 2007 2024 } … … 2012 2029 keyword=(const char *) attributes[i++]; 2013 2030 attribute=InterpretImageProperties(msl_info->image_info[n], 2014 msl_info->attributes[n],(c har *) attributes[i]);2031 msl_info->attributes[n],(const char *) attributes[i]); 2015 2032 CloneString(&value,attribute); 2016 2033 switch (*keyword) … … 2044 2061 break; 2045 2062 } 2046 if (LocaleCompare((c har *) tag,"crop") == 0)2063 if (LocaleCompare((const char *) tag,"crop") == 0) 2047 2064 { 2048 2065 Image … … 2054 2071 if (msl_info->image[n] == (Image *) NULL) 2055 2072 { 2056 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2073 ThrowMSLException(OptionError,"NoImagesDefined", 2074 (const char *) tag); 2057 2075 break; 2058 2076 } … … 2063 2081 keyword=(const char *) attributes[i++]; 2064 2082 attribute=InterpretImageProperties(msl_info->image_info[n], 2065 msl_info->attributes[n],(c har *) attributes[i]);2083 msl_info->attributes[n],(const char *) attributes[i]); 2066 2084 CloneString(&value,attribute); 2067 2085 switch (*keyword) … … 2146 2164 break; 2147 2165 } 2148 if (LocaleCompare((c har *) tag,"cycle-colormap") == 0)2166 if (LocaleCompare((const char *) tag,"cycle-colormap") == 0) 2149 2167 { 2150 2168 long … … 2156 2174 if (msl_info->image[n] == (Image *) NULL) 2157 2175 { 2158 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2176 ThrowMSLException(OptionError,"NoImagesDefined", 2177 (const char *) tag); 2159 2178 break; 2160 2179 } … … 2165 2184 keyword=(const char *) attributes[i++]; 2166 2185 attribute=InterpretImageProperties(msl_info->image_info[n], 2167 msl_info->attributes[n],(c har *) attributes[i]);2186 msl_info->attributes[n],(const char *) attributes[i]); 2168 2187 CloneString(&value,attribute); 2169 2188 switch (*keyword) … … 2197 2216 case 'd': 2198 2217 { 2199 if (LocaleCompare((c har *) tag,"despeckle") == 0)2218 if (LocaleCompare((const char *) tag,"despeckle") == 0) 2200 2219 { 2201 2220 Image … … 2207 2226 if (msl_info->image[n] == (Image *) NULL) 2208 2227 { 2209 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2228 ThrowMSLException(OptionError,"NoImagesDefined", 2229 (const char *) tag); 2210 2230 break; 2211 2231 } … … 2215 2235 keyword=(const char *) attributes[i++]; 2216 2236 attribute=InterpretImageProperties(msl_info->image_info[n], 2217 msl_info->attributes[n],(c har *) attributes[i]);2237 msl_info->attributes[n],(const char *) attributes[i]); 2218 2238 CloneString(&value,attribute); 2219 2239 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); … … 2227 2247 break; 2228 2248 } 2229 if (LocaleCompare((c har *) tag,"display") == 0)2249 if (LocaleCompare((const char *) tag,"display") == 0) 2230 2250 { 2231 2251 if (msl_info->image[n] == (Image *) NULL) 2232 2252 { 2233 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2253 ThrowMSLException(OptionError,"NoImagesDefined", 2254 (const char *) tag); 2234 2255 break; 2235 2256 } … … 2239 2260 keyword=(const char *) attributes[i++]; 2240 2261 attribute=InterpretImageProperties(msl_info->image_info[n], 2241 msl_info->attributes[n],(c har *) attributes[i]);2262 msl_info->attributes[n],(const char *) attributes[i]); 2242 2263 CloneString(&value,attribute); 2243 2264 switch (*keyword) … … 2254 2275 break; 2255 2276 } 2256 if (LocaleCompare((c har *) tag,"draw") == 0)2277 if (LocaleCompare((const char *) tag,"draw") == 0) 2257 2278 { 2258 2279 char … … 2264 2285 if (msl_info->image[n] == (Image *) NULL) 2265 2286 { 2266 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2287 ThrowMSLException(OptionError,"NoImagesDefined", 2288 (const char *) tag); 2267 2289 break; 2268 2290 } … … 2277 2299 keyword=(const char *) attributes[i++]; 2278 2300 attribute=InterpretImageProperties(msl_info->image_info[n], 2279 msl_info->attributes[n],(c har *) attributes[i]);2301 msl_info->attributes[n],(const char *) attributes[i]); 2280 2302 CloneString(&value,attribute); 2281 2303 switch (*keyword) … … 2409 2431 { 2410 2432 if (LocaleCompare(keyword,"primitive") == 0) 2411 { 2433 { 2412 2434 CloneString(&draw_info->primitive,value); 2413 2435 break; … … 2595 2617 case 'e': 2596 2618 { 2597 if (LocaleCompare((c har *) tag,"edge") == 0)2619 if (LocaleCompare((const char *) tag,"edge") == 0) 2598 2620 { 2599 2621 Image … … 2605 2627 if (msl_info->image[n] == (Image *) NULL) 2606 2628 { 2607 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2629 ThrowMSLException(OptionError,"NoImagesDefined", 2630 (const char *) tag); 2608 2631 break; 2609 2632 } … … 2613 2636 keyword=(const char *) attributes[i++]; 2614 2637 attribute=InterpretImageProperties(msl_info->image_info[n], 2615 msl_info->attributes[n],(c har *) attributes[i]);2638 msl_info->attributes[n],(const char *) attributes[i]); 2616 2639 CloneString(&value,attribute); 2617 2640 switch (*keyword) … … 2659 2682 break; 2660 2683 } 2661 if (LocaleCompare((c har *) tag,"emboss") == 0)2684 if (LocaleCompare((const char *) tag,"emboss") == 0) 2662 2685 { 2663 2686 Image … … 2669 2692 if (msl_info->image[n] == (Image *) NULL) 2670 2693 { 2671 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2694 ThrowMSLException(OptionError,"NoImagesDefined", 2695 (const char *) tag); 2672 2696 break; 2673 2697 } … … 2677 2701 keyword=(const char *) attributes[i++]; 2678 2702 attribute=InterpretImageProperties(msl_info->image_info[n], 2679 msl_info->attributes[n],(c har *) attributes[i]);2703 msl_info->attributes[n],(const char *) attributes[i]); 2680 2704 CloneString(&value,attribute); 2681 2705 switch (*keyword) … … 2735 2759 break; 2736 2760 } 2737 if (LocaleCompare((c har *) tag,"enhance") == 0)2761 if (LocaleCompare((const char *) tag,"enhance") == 0) 2738 2762 { 2739 2763 Image … … 2745 2769 if (msl_info->image[n] == (Image *) NULL) 2746 2770 { 2747 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2771 ThrowMSLException(OptionError,"NoImagesDefined", 2772 (const char *) tag); 2748 2773 break; 2749 2774 } … … 2753 2778 keyword=(const char *) attributes[i++]; 2754 2779 attribute=InterpretImageProperties(msl_info->image_info[n], 2755 msl_info->attributes[n],(c har *) attributes[i]);2780 msl_info->attributes[n],(const char *) attributes[i]); 2756 2781 CloneString(&value,attribute); 2757 2782 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); … … 2765 2790 break; 2766 2791 } 2767 if (LocaleCompare((c har *) tag,"equalize") == 0)2792 if (LocaleCompare((const char *) tag,"equalize") == 0) 2768 2793 { 2769 2794 /* … … 2772 2797 if (msl_info->image[n] == (Image *) NULL) 2773 2798 { 2774 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2799 ThrowMSLException(OptionError,"NoImagesDefined", 2800 (const char *) tag); 2775 2801 break; 2776 2802 } … … 2780 2806 keyword=(const char *) attributes[i++]; 2781 2807 attribute=InterpretImageProperties(msl_info->image_info[n], 2782 msl_info->attributes[n],(c har *) attributes[i]);2808 msl_info->attributes[n],(const char *) attributes[i]); 2783 2809 CloneString(&value,attribute); 2784 2810 switch (*keyword) … … 2800 2826 case 'f': 2801 2827 { 2802 if (LocaleCompare((c har *) tag, "flatten") == 0)2828 if (LocaleCompare((const char *) tag, "flatten") == 0) 2803 2829 { 2804 2830 if (msl_info->image[n] == (Image *) NULL) 2805 2831 { 2806 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2832 ThrowMSLException(OptionError,"NoImagesDefined", 2833 (const char *) tag); 2807 2834 break; 2808 2835 } … … 2824 2851 } 2825 2852 } 2826 if (LocaleCompare((c har *) tag,"flip") == 0)2853 if (LocaleCompare((const char *) tag,"flip") == 0) 2827 2854 { 2828 2855 Image … … 2834 2861 if (msl_info->image[n] == (Image *) NULL) 2835 2862 { 2836 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2863 ThrowMSLException(OptionError,"NoImagesDefined", 2864 (const char *) tag); 2837 2865 break; 2838 2866 } … … 2842 2870 keyword=(const char *) attributes[i++]; 2843 2871 attribute=InterpretImageProperties(msl_info->image_info[n], 2844 msl_info->attributes[n],(c har *) attributes[i]);2872 msl_info->attributes[n],(const char *) attributes[i]); 2845 2873 CloneString(&value,attribute); 2846 2874 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); … … 2854 2882 break; 2855 2883 } 2856 if (LocaleCompare((c har *) tag,"flop") == 0)2884 if (LocaleCompare((const char *) tag,"flop") == 0) 2857 2885 { 2858 2886 Image … … 2864 2892 if (msl_info->image[n] == (Image *) NULL) 2865 2893 { 2866 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2894 ThrowMSLException(OptionError,"NoImagesDefined", 2895 (const char *) tag); 2867 2896 break; 2868 2897 } … … 2872 2901 keyword=(const char *) attributes[i++]; 2873 2902 attribute=InterpretImageProperties(msl_info->image_info[n], 2874 msl_info->attributes[n],(c har *) attributes[i]);2903 msl_info->attributes[n],(const char *) attributes[i]); 2875 2904 CloneString(&value,attribute); 2876 2905 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); … … 2884 2913 break; 2885 2914 } 2886 if (LocaleCompare((c har *) tag,"frame") == 0)2915 if (LocaleCompare((const char *) tag,"frame") == 0) 2887 2916 { 2888 2917 FrameInfo … … 2897 2926 if (msl_info->image[n] == (Image *) NULL) 2898 2927 { 2899 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 2928 ThrowMSLException(OptionError,"NoImagesDefined", 2929 (const char *) tag); 2900 2930 break; 2901 2931 } … … 2906 2936 keyword=(const char *) attributes[i++]; 2907 2937 attribute=InterpretImageProperties(msl_info->image_info[n], 2908 msl_info->attributes[n],(c har *) attributes[i]);2938 msl_info->attributes[n],(const char *) attributes[i]); 2909 2939 CloneString(&value,attribute); 2910 2940 switch (*keyword) … … 3032 3062 case 'g': 3033 3063 { 3034 if (LocaleCompare((c har *) tag,"gamma") == 0)3064 if (LocaleCompare((const char *) tag,"gamma") == 0) 3035 3065 { 3036 3066 char … … 3045 3075 if (msl_info->image[n] == (Image *) NULL) 3046 3076 { 3047 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3077 ThrowMSLException(OptionError,"NoImagesDefined", 3078 (const char *) tag); 3048 3079 break; 3049 3080 } … … 3058 3089 keyword=(const char *) attributes[i++]; 3059 3090 attribute=InterpretImageProperties(msl_info->image_info[n], 3060 msl_info->attributes[n],(c har *) attributes[i]);3091 msl_info->attributes[n],(const char *) attributes[i]); 3061 3092 CloneString(&value,attribute); 3062 3093 switch (*keyword) … … 3130 3161 (void) FormatMagickString(gamma,MaxTextExtent,"%g,%g,%g", 3131 3162 (double) pixel.red,(double) pixel.green,(double) pixel.blue); 3132 switch (channel) 3163 switch (channel) 3133 3164 { 3134 3165 default: … … 3157 3188 break; 3158 3189 } 3159 else if (LocaleCompare((c har *) tag,"get") == 0)3190 else if (LocaleCompare((const char *) tag,"get") == 0) 3160 3191 { 3161 3192 if (msl_info->image[n] == (Image *) NULL) 3162 3193 { 3163 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3194 ThrowMSLException(OptionError,"NoImagesDefined", 3195 (const char *) tag); 3164 3196 break; 3165 3197 } … … 3169 3201 { 3170 3202 keyword=(const char *) attributes[i++]; 3171 CloneString(&value,(c har *) attributes[i]);3203 CloneString(&value,(const char *) attributes[i]); 3172 3204 (void) CopyMagickString(key,value,MaxTextExtent); 3173 3205 switch (*keyword) … … 3206 3238 break; 3207 3239 } 3208 else if (LocaleCompare((c har *) tag, "group") == 0)3240 else if (LocaleCompare((const char *) tag, "group") == 0) 3209 3241 { 3210 3242 msl_info->number_groups++; … … 3219 3251 case 'i': 3220 3252 { 3221 if (LocaleCompare((c har *) tag,"image") == 0)3253 if (LocaleCompare((const char *) tag,"image") == 0) 3222 3254 { 3223 3255 long … … 3225 3257 3226 3258 MSLPushImage(msl_info,(Image *) NULL); 3227 n=msl_info->n;3228 3259 if (attributes == (const xmlChar **) NULL) 3229 3260 break; 3261 (void) SetMSLAttributes(msl_info,attributes); 3230 3262 for (i=0; (attributes[i] != (const xmlChar *) NULL); i++) 3231 3263 { 3232 3264 keyword=(const char *) attributes[i++]; 3233 3265 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 3234 msl_info->attributes[n],(c har *) attributes[i]));3266 msl_info->attributes[n],(const char *) attributes[i])); 3235 3267 switch (*keyword) 3236 3268 { 3237 case 'B': 3238 case 'b': 3239 { 3240 if (LocaleCompare(keyword,"background") == 0) 3241 { 3242 (void) QueryColorDatabase(value, 3243 &msl_info->image_info[n]->background_color,&exception); 3244 break; 3245 } 3246 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 3247 break; 3248 } 3249 3250 case 'C': 3251 case 'c': 3252 { 3253 if (LocaleCompare(keyword,"color") == 0) 3254 { 3255 Image 3256 *next_image; 3257 3258 (void) CopyMagickString(msl_info->image_info[n]->filename,"xc:", 3259 MaxTextExtent); 3260 (void) ConcatenateMagickString(msl_info->image_info[n]->filename, 3261 value,MaxTextExtent); 3262 next_image=ReadImage(msl_info->image_info[n],&exception); 3263 CatchException(&exception); 3264 if (next_image == (Image *) NULL) 3265 continue; 3266 if (msl_info->image[n] == (Image *) NULL) 3267 msl_info->image[n]=next_image; 3268 else 3269 { 3270 register Image 3271 *p; 3272 3273 /* 3274 Link image into image list. 3275 */ 3276 p=msl_info->image[n]; 3277 for ( ; p->next != (Image *) NULL; p=GetNextImageInList(p)) ; 3278 next_image->previous=p; 3279 p->next=next_image; 3280 } 3281 break; 3282 } 3283 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 3284 break; 3285 } 3286 3287 case 'I': 3288 case 'i': 3289 { 3290 if (LocaleCompare(keyword,"id") == 0) 3291 { 3292 (void) SetImageProperty(msl_info->attributes[n],keyword,NULL); /* make sure to clear it! */ 3293 (void) SetImageProperty(msl_info->attributes[n],keyword,value); 3294 break; 3295 } 3296 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 3297 break; 3298 } 3299 case 'S': 3300 case 's': 3301 { 3302 if (LocaleCompare(keyword,"size") == 0) 3303 { 3304 CloneString(&msl_info->image_info[n]->size,value); 3305 break; 3306 } 3269 case 'C': 3270 case 'c': 3271 { 3272 if (LocaleCompare(keyword,"color") == 0) 3273 { 3274 Image 3275 *next_image; 3276 3277 (void) CopyMagickString(msl_info->image_info[n]->filename, 3278 "xc:",MaxTextExtent); 3279 (void) ConcatenateMagickString(msl_info->image_info[n]-> 3280 filename,value,MaxTextExtent); 3281 next_image=ReadImage(msl_info->image_info[n],&exception); 3282 CatchException(&exception); 3283 if (next_image == (Image *) NULL) 3284 continue; 3285 if (msl_info->image[n] == (Image *) NULL) 3286 msl_info->image[n]=next_image; 3287 else 3288 { 3289 register Image 3290 *p; 3291 3292 /* 3293 Link image into image list. 3294 */ 3295 p=msl_info->image[n]; 3296 while (p->next != (Image *) NULL) 3297 p=GetNextImageInList(p); 3298 next_image->previous=p; 3299 p->next=next_image; 3300 } 3301 break; 3302 } 3307 3303 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 3308 3304 break; … … 3317 3313 break; 3318 3314 } 3319 if (LocaleCompare((c har *) tag,"implode") == 0)3315 if (LocaleCompare((const char *) tag,"implode") == 0) 3320 3316 { 3321 3317 Image … … 3327 3323 if (msl_info->image[n] == (Image *) NULL) 3328 3324 { 3329 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3325 ThrowMSLException(OptionError,"NoImagesDefined", 3326 (const char *) tag); 3330 3327 break; 3331 3328 } … … 3335 3332 keyword=(const char *) attributes[i++]; 3336 3333 attribute=InterpretImageProperties(msl_info->image_info[n], 3337 msl_info->attributes[n],(c har *) attributes[i]);3334 msl_info->attributes[n],(const char *) attributes[i]); 3338 3335 CloneString(&value,attribute); 3339 3336 switch (*keyword) … … 3386 3383 case 'l': 3387 3384 { 3388 if (LocaleCompare((c har *) tag,"label") == 0)3385 if (LocaleCompare((const char *) tag,"label") == 0) 3389 3386 break; 3390 if (LocaleCompare((c har *) tag, "level") == 0)3387 if (LocaleCompare((const char *) tag, "level") == 0) 3391 3388 { 3392 3389 double … … 3395 3392 if (msl_info->image[n] == (Image *) NULL) 3396 3393 { 3397 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3394 ThrowMSLException(OptionError,"NoImagesDefined", 3395 (const char *) tag); 3398 3396 break; 3399 3397 } … … 3403 3401 { 3404 3402 keyword=(const char *) attributes[i++]; 3405 CloneString(&value,(c har *) attributes[i]);3403 CloneString(&value,(const char *) attributes[i]); 3406 3404 (void) CopyMagickString(key,value,MaxTextExtent); 3407 3405 switch (*keyword) … … 3461 3459 case 'm': 3462 3460 { 3463 if (LocaleCompare((c har *) tag,"magnify") == 0)3461 if (LocaleCompare((const char *) tag,"magnify") == 0) 3464 3462 { 3465 3463 Image … … 3471 3469 if (msl_info->image[n] == (Image *) NULL) 3472 3470 { 3473 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3471 ThrowMSLException(OptionError,"NoImagesDefined", 3472 (const char *) tag); 3474 3473 break; 3475 3474 } … … 3479 3478 keyword=(const char *) attributes[i++]; 3480 3479 attribute=InterpretImageProperties(msl_info->image_info[n], 3481 msl_info->attributes[n],(c har *) attributes[i]);3480 msl_info->attributes[n],(const char *) attributes[i]); 3482 3481 CloneString(&value,attribute); 3483 3482 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); … … 3491 3490 break; 3492 3491 } 3493 if (LocaleCompare((c har *) tag,"map") == 0)3492 if (LocaleCompare((const char *) tag,"map") == 0) 3494 3493 { 3495 3494 Image … … 3507 3506 if (msl_info->image[n] == (Image *) NULL) 3508 3507 { 3509 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3508 ThrowMSLException(OptionError,"NoImagesDefined", 3509 (const char *) tag); 3510 3510 break; 3511 3511 } … … 3517 3517 keyword=(const char *) attributes[i++]; 3518 3518 attribute=InterpretImageProperties(msl_info->image_info[n], 3519 msl_info->attributes[n],(c har *) attributes[i]);3519 msl_info->attributes[n],(const char *) attributes[i]); 3520 3520 CloneString(&value,attribute); 3521 3521 switch (*keyword) … … 3546 3546 const char 3547 3547 *attribute; 3548 3548 3549 3549 attribute=GetImageProperty(msl_info->attributes[j],"id"); 3550 3550 if ((attribute != (const char *) NULL) && … … 3574 3574 break; 3575 3575 } 3576 if (LocaleCompare((c har *) tag,"matte-floodfill") == 0)3576 if (LocaleCompare((const char *) tag,"matte-floodfill") == 0) 3577 3577 { 3578 3578 double … … 3591 3591 if (msl_info->image[n] == (Image *) NULL) 3592 3592 { 3593 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3593 ThrowMSLException(OptionError,"NoImagesDefined", 3594 (const char *) tag); 3594 3595 break; 3595 3596 } … … 3601 3602 keyword=(const char *) attributes[i++]; 3602 3603 attribute=InterpretImageProperties(msl_info->image_info[n], 3603 msl_info->attributes[n],(c har *) attributes[i]);3604 msl_info->attributes[n],(const char *) attributes[i]); 3604 3605 CloneString(&value,attribute); 3605 3606 switch (*keyword) … … 3704 3705 break; 3705 3706 } 3706 if (LocaleCompare((c har *) tag,"median-filter") == 0)3707 if (LocaleCompare((const char *) tag,"median-filter") == 0) 3707 3708 { 3708 3709 Image … … 3714 3715 if (msl_info->image[n] == (Image *) NULL) 3715 3716 { 3716 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3717 ThrowMSLException(OptionError,"NoImagesDefined", 3718 (const char *) tag); 3717 3719 break; 3718 3720 } … … 3722 3724 keyword=(const char *) attributes[i++]; 3723 3725 attribute=InterpretImageProperties(msl_info->image_info[n], 3724 msl_info->attributes[n],(c har *) attributes[i]);3726 msl_info->attributes[n],(const char *) attributes[i]); 3725 3727 CloneString(&value,attribute); 3726 3728 switch (*keyword) … … 3768 3770 break; 3769 3771 } 3770 if (LocaleCompare((c har *) tag,"minify") == 0)3772 if (LocaleCompare((const char *) tag,"minify") == 0) 3771 3773 { 3772 3774 Image … … 3778 3780 if (msl_info->image[n] == (Image *) NULL) 3779 3781 { 3780 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3782 ThrowMSLException(OptionError,"NoImagesDefined", 3783 (const char *) tag); 3781 3784 break; 3782 3785 } … … 3786 3789 keyword=(const char *) attributes[i++]; 3787 3790 attribute=InterpretImageProperties(msl_info->image_info[n], 3788 msl_info->attributes[n],(c har *) attributes[i]);3791 msl_info->attributes[n],(const char *) attributes[i]); 3789 3792 CloneString(&value,attribute); 3790 3793 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); … … 3798 3801 break; 3799 3802 } 3800 if (LocaleCompare((c har *) tag,"msl") == 0 )3803 if (LocaleCompare((const char *) tag,"msl") == 0 ) 3801 3804 break; 3802 if (LocaleCompare((c har *) tag,"modulate") == 0)3805 if (LocaleCompare((const char *) tag,"modulate") == 0) 3803 3806 { 3804 3807 char … … 3810 3813 if (msl_info->image[n] == (Image *) NULL) 3811 3814 { 3812 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3815 ThrowMSLException(OptionError,"NoImagesDefined", 3816 (const char *) tag); 3813 3817 break; 3814 3818 } … … 3821 3825 keyword=(const char *) attributes[i++]; 3822 3826 attribute=InterpretImageProperties(msl_info->image_info[n], 3823 msl_info->attributes[n],(c har *) attributes[i]);3827 msl_info->attributes[n],(const char *) attributes[i]); 3824 3828 CloneString(&value,attribute); 3825 3829 switch (*keyword) … … 3920 3924 case 'n': 3921 3925 { 3922 if (LocaleCompare((c har *) tag,"negate") == 0)3926 if (LocaleCompare((const char *) tag,"negate") == 0) 3923 3927 { 3924 3928 MagickBooleanType … … 3930 3934 if (msl_info->image[n] == (Image *) NULL) 3931 3935 { 3932 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 3936 ThrowMSLException(OptionError,"NoImagesDefined", 3937 (const char *) tag); 3933 3938 break; 3934 3939 } … … 3939 3944 keyword=(const char *) attributes[i++]; 3940 3945 attribute=InterpretImageProperties(msl_info->image_info[n], 3941 msl_info->attributes[n],(c har *) attributes[i]);3946 msl_info->attributes[n],(const char *) attributes[i]); 3942 3947 CloneString(&value,attribute); 3943 3948 switch (*keyword) … … 3987 3992 break; 3988 3993 } 3989 if (LocaleCompare((c har *) tag,"normalize") == 0)3994 if (LocaleCompare((const char *) tag,"normalize") == 0) 3990 3995 { 3991 3996 /* … … 3994 3999 if (msl_info->image[n] == (Image *) NULL) 3995 4000 { 3996 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4001 ThrowMSLException(OptionError,"NoImagesDefined", 4002 (const char *) tag); 3997 4003 break; 3998 4004 } … … 4002 4008 keyword=(const char *) attributes[i++]; 4003 4009 attribute=InterpretImageProperties(msl_info->image_info[n], 4004 msl_info->attributes[n],(c har *) attributes[i]);4010 msl_info->attributes[n],(const char *) attributes[i]); 4005 4011 CloneString(&value,attribute); 4006 4012 switch (*keyword) … … 4038 4044 case 'o': 4039 4045 { 4040 if (LocaleCompare((c har *) tag,"oil-paint") == 0)4046 if (LocaleCompare((const char *) tag,"oil-paint") == 0) 4041 4047 { 4042 4048 Image … … 4048 4054 if (msl_info->image[n] == (Image *) NULL) 4049 4055 { 4050 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4056 ThrowMSLException(OptionError,"NoImagesDefined", 4057 (const char *) tag); 4051 4058 break; 4052 4059 } … … 4056 4063 keyword=(const char *) attributes[i++]; 4057 4064 attribute=InterpretImageProperties(msl_info->image_info[n], 4058 msl_info->attributes[n],(c har *) attributes[i]);4065 msl_info->attributes[n],(const char *) attributes[i]); 4059 4066 CloneString(&value,attribute); 4060 4067 switch (*keyword) … … 4102 4109 break; 4103 4110 } 4104 if (LocaleCompare((c har *) tag,"opaque") == 0)4111 if (LocaleCompare((const char *) tag,"opaque") == 0) 4105 4112 { 4106 4113 MagickPixelPacket … … 4113 4120 if (msl_info->image[n] == (Image *) NULL) 4114 4121 { 4115 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4122 ThrowMSLException(OptionError,"NoImagesDefined", 4123 (const char *) tag); 4116 4124 break; 4117 4125 } … … 4123 4131 keyword=(const char *) attributes[i++]; 4124 4132 attribute=InterpretImageProperties(msl_info->image_info[n], 4125 msl_info->attributes[n],(c har *) attributes[i]);4133 msl_info->attributes[n],(const char *) attributes[i]); 4126 4134 CloneString(&value,attribute); 4127 4135 switch (*keyword) … … 4177 4185 case 'p': 4178 4186 { 4179 if (LocaleCompare((c har *) tag,"print") == 0)4187 if (LocaleCompare((const char *) tag,"print") == 0) 4180 4188 { 4181 4189 if (attributes == (const xmlChar **) NULL) … … 4185 4193 keyword=(const char *) attributes[i++]; 4186 4194 attribute=InterpretImageProperties(msl_info->image_info[n], 4187 msl_info->attributes[n],(c har *) attributes[i]);4195 msl_info->attributes[n],(const char *) attributes[i]); 4188 4196 CloneString(&value,attribute); 4189 4197 switch (*keyword) … … 4214 4222 case 'q': 4215 4223 { 4216 if (LocaleCompare((c har *) tag,"quantize") == 0)4224 if (LocaleCompare((const char *) tag,"quantize") == 0) 4217 4225 { 4218 4226 QuantizeInfo … … 4224 4232 if (msl_info->image[n] == (Image *) NULL) 4225 4233 { 4226 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4234 ThrowMSLException(OptionError,"NoImagesDefined", 4235 (const char *) tag); 4227 4236 break; 4228 4237 } … … 4233 4242 keyword=(const char *) attributes[i++]; 4234 4243 attribute=InterpretImageProperties(msl_info->image_info[n], 4235 msl_info->attributes[n],(c har *) attributes[i]);4244 msl_info->attributes[n],(const char *) attributes[i]); 4236 4245 CloneString(&value,attribute); 4237 4246 switch (*keyword) … … 4316 4325 break; 4317 4326 } 4318 if (LocaleCompare((c har *) tag,"query-font-metrics") == 0)4327 if (LocaleCompare((const char *) tag,"query-font-metrics") == 0) 4319 4328 { 4320 4329 char … … 4340 4349 keyword=(const char *) attributes[i++]; 4341 4350 attribute=InterpretImageProperties(msl_info->image_info[n], 4342 msl_info->attributes[n],(c har *) attributes[i]);4351 msl_info->attributes[n],(const char *) attributes[i]); 4343 4352 CloneString(&value,attribute); 4344 4353 switch (*keyword) … … 4686 4695 case 'r': 4687 4696 { 4688 if (LocaleCompare((c har *) tag,"raise") == 0)4697 if (LocaleCompare((const char *) tag,"raise") == 0) 4689 4698 { 4690 4699 MagickBooleanType … … 4696 4705 if (msl_info->image[n] == (Image *) NULL) 4697 4706 { 4698 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4707 ThrowMSLException(OptionError,"NoImagesDefined", 4708 (const char *) tag); 4699 4709 break; 4700 4710 } … … 4706 4716 keyword=(const char *) attributes[i++]; 4707 4717 attribute=InterpretImageProperties(msl_info->image_info[n], 4708 msl_info->attributes[n],(c har *) attributes[i]);4718 msl_info->attributes[n],(const char *) attributes[i]); 4709 4719 CloneString(&value,attribute); 4710 4720 switch (*keyword) … … 4777 4787 break; 4778 4788 } 4779 if (LocaleCompare((c har *) tag,"read") == 0)4789 if (LocaleCompare((const char *) tag,"read") == 0) 4780 4790 { 4781 4791 if (attributes == (const xmlChar **) NULL) … … 4785 4795 keyword=(const char *) attributes[i++]; 4786 4796 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 4787 msl_info->attributes[n],(c har *) attributes[i]));4797 msl_info->attributes[n],(const char *) attributes[i])); 4788 4798 switch (*keyword) 4789 4799 { … … 4856 4866 break; 4857 4867 } 4858 if (LocaleCompare((c har *) tag,"reduce-noise") == 0)4868 if (LocaleCompare((const char *) tag,"reduce-noise") == 0) 4859 4869 { 4860 4870 Image … … 4866 4876 if (msl_info->image[n] == (Image *) NULL) 4867 4877 { 4868 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4878 ThrowMSLException(OptionError,"NoImagesDefined", 4879 (const char *) tag); 4869 4880 break; 4870 4881 } … … 4874 4885 keyword=(const char *) attributes[i++]; 4875 4886 attribute=InterpretImageProperties(msl_info->image_info[n], 4876 msl_info->attributes[n],(c har *) attributes[i]);4887 msl_info->attributes[n],(const char *) attributes[i]); 4877 4888 CloneString(&value,attribute); 4878 4889 switch (*keyword) … … 4920 4931 break; 4921 4932 } 4922 else if (LocaleCompare((c har *) tag,"repage") == 0)4933 else if (LocaleCompare((const char *) tag,"repage") == 0) 4923 4934 { 4924 4935 /* init the values */ … … 4930 4941 if (msl_info->image[n] == (Image *) NULL) 4931 4942 { 4932 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 4943 ThrowMSLException(OptionError,"NoImagesDefined", 4944 (const char *) tag); 4933 4945 break; 4934 4946 } … … 4939 4951 keyword=(const char *) attributes[i++]; 4940 4952 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 4941 msl_info->attributes[n],(c har *) attributes[i]));4953 msl_info->attributes[n],(const char *) attributes[i])); 4942 4954 switch (*keyword) 4943 4955 { … … 5040 5052 } 5041 5053 5042 msl_info->image[n]->page.width=width; 5043 msl_info->image[n]->page.height=height; 5044 msl_info->image[n]->page.x=x; 5045 msl_info->image[n]->page.y=y; 5054 msl_info->image[n]->page.width=width; 5055 msl_info->image[n]->page.height=height; 5056 msl_info->image[n]->page.x=x; 5057 msl_info->image[n]->page.y=y; 5046 5058 break; 5047 5059 } 5048 else if (LocaleCompare((c har *) tag,"resample") == 0)5060 else if (LocaleCompare((const char *) tag,"resample") == 0) 5049 5061 { 5050 5062 double … … 5054 5066 if (msl_info->image[n] == (Image *) NULL) 5055 5067 { 5056 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5068 ThrowMSLException(OptionError,"NoImagesDefined", 5069 (const char *) tag); 5057 5070 break; 5058 5071 } … … 5065 5078 keyword=(const char *) attributes[i++]; 5066 5079 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 5067 msl_info->attributes[n],(c har *) attributes[i]));5080 msl_info->attributes[n],(const char *) attributes[i])); 5068 5081 switch (*keyword) 5069 5082 { … … 5154 5167 break; 5155 5168 } 5156 if (LocaleCompare((c har *) tag,"resize") == 0)5169 if (LocaleCompare((const char *) tag,"resize") == 0) 5157 5170 { 5158 5171 double … … 5170 5183 if (msl_info->image[n] == (Image *) NULL) 5171 5184 { 5172 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5185 ThrowMSLException(OptionError,"NoImagesDefined", 5186 (const char *) tag); 5173 5187 break; 5174 5188 } … … 5180 5194 keyword=(const char *) attributes[i++]; 5181 5195 attribute=InterpretImageProperties(msl_info->image_info[n], 5182 msl_info->attributes[n],(c har *) attributes[i]);5196 msl_info->attributes[n],(const char *) attributes[i]); 5183 5197 CloneString(&value,attribute); 5184 5198 switch (*keyword) … … 5266 5280 break; 5267 5281 } 5268 if (LocaleCompare((c har *) tag,"roll") == 0)5282 if (LocaleCompare((const char *) tag,"roll") == 0) 5269 5283 { 5270 5284 Image … … 5276 5290 if (msl_info->image[n] == (Image *) NULL) 5277 5291 { 5278 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5292 ThrowMSLException(OptionError,"NoImagesDefined", 5293 (const char *) tag); 5279 5294 break; 5280 5295 } … … 5285 5300 keyword=(const char *) attributes[i++]; 5286 5301 attribute=InterpretImageProperties(msl_info->image_info[n], 5287 msl_info->attributes[n],(c har *) attributes[i]);5302 msl_info->attributes[n],(const char *) attributes[i]); 5288 5303 CloneString(&value,attribute); 5289 5304 switch (*keyword) … … 5344 5359 break; 5345 5360 } 5346 else if (LocaleCompare((c har *) tag,"roll") == 0)5361 else if (LocaleCompare((const char *) tag,"roll") == 0) 5347 5362 { 5348 5363 /* init the values */ … … 5353 5368 if (msl_info->image[n] == (Image *) NULL) 5354 5369 { 5355 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5370 ThrowMSLException(OptionError,"NoImagesDefined", 5371 (const char *) tag); 5356 5372 break; 5357 5373 } … … 5362 5378 keyword=(const char *) attributes[i++]; 5363 5379 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 5364 msl_info->attributes[n],(c har *) attributes[i]));5380 msl_info->attributes[n],(const char *) attributes[i])); 5365 5381 switch (*keyword) 5366 5382 { … … 5422 5438 break; 5423 5439 } 5424 if (LocaleCompare((c har *) tag,"rotate") == 0)5440 if (LocaleCompare((const char *) tag,"rotate") == 0) 5425 5441 { 5426 5442 Image … … 5432 5448 if (msl_info->image[n] == (Image *) NULL) 5433 5449 { 5434 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5450 ThrowMSLException(OptionError,"NoImagesDefined", 5451 (const char *) tag); 5435 5452 break; 5436 5453 } … … 5440 5457 keyword=(const char *) attributes[i++]; 5441 5458 attribute=InterpretImageProperties(msl_info->image_info[n], 5442 msl_info->attributes[n],(c har *) attributes[i]);5459 msl_info->attributes[n],(const char *) attributes[i]); 5443 5460 CloneString(&value,attribute); 5444 5461 switch (*keyword) … … 5486 5503 break; 5487 5504 } 5488 else if (LocaleCompare((c har *) tag,"rotate") == 0)5505 else if (LocaleCompare((const char *) tag,"rotate") == 0) 5489 5506 { 5490 5507 /* init the values */ … … 5493 5510 if (msl_info->image[n] == (Image *) NULL) 5494 5511 { 5495 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5512 ThrowMSLException(OptionError,"NoImagesDefined", 5513 (const char *) tag); 5496 5514 break; 5497 5515 } … … 5502 5520 keyword=(const char *) attributes[i++]; 5503 5521 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 5504 msl_info->attributes[n],(c har *) attributes[i]));5522 msl_info->attributes[n],(const char *) attributes[i])); 5505 5523 switch (*keyword) 5506 5524 { … … 5545 5563 case 's': 5546 5564 { 5547 if (LocaleCompare((c har *) tag,"sample") == 0)5565 if (LocaleCompare((const char *) tag,"sample") == 0) 5548 5566 { 5549 5567 Image … … 5555 5573 if (msl_info->image[n] == (Image *) NULL) 5556 5574 { 5557 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5575 ThrowMSLException(OptionError,"NoImagesDefined", 5576 (const char *) tag); 5558 5577 break; 5559 5578 } … … 5563 5582 keyword=(const char *) attributes[i++]; 5564 5583 attribute=InterpretImageProperties(msl_info->image_info[n], 5565 msl_info->attributes[n],(c har *) attributes[i]);5584 msl_info->attributes[n],(const char *) attributes[i]); 5566 5585 CloneString(&value,attribute); 5567 5586 switch (*keyword) … … 5620 5639 break; 5621 5640 } 5622 if (LocaleCompare((c har *) tag,"scale") == 0)5641 if (LocaleCompare((const char *) tag,"scale") == 0) 5623 5642 { 5624 5643 Image … … 5630 5649 if (msl_info->image[n] == (Image *) NULL) 5631 5650 { 5632 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5651 ThrowMSLException(OptionError,"NoImagesDefined", 5652 (const char *) tag); 5633 5653 break; 5634 5654 } … … 5638 5658 keyword=(const char *) attributes[i++]; 5639 5659 attribute=InterpretImageProperties(msl_info->image_info[n], 5640 msl_info->attributes[n],(c har *) attributes[i]);5660 msl_info->attributes[n],(const char *) attributes[i]); 5641 5661 CloneString(&value,attribute); 5642 5662 switch (*keyword) … … 5695 5715 break; 5696 5716 } 5697 if (LocaleCompare((c har *) tag,"segment") == 0)5717 if (LocaleCompare((const char *) tag,"segment") == 0) 5698 5718 { 5699 5719 ColorspaceType … … 5702 5722 MagickBooleanType 5703 5723 verbose; 5704 5724 5705 5725 /* 5706 5726 Segment image. … … 5708 5728 if (msl_info->image[n] == (Image *) NULL) 5709 5729 { 5710 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5730 ThrowMSLException(OptionError,"NoImagesDefined", 5731 (const char *) tag); 5711 5732 break; 5712 5733 } … … 5720 5741 keyword=(const char *) attributes[i++]; 5721 5742 attribute=InterpretImageProperties(msl_info->image_info[n], 5722 msl_info->attributes[n],(c har *) attributes[i]);5743 msl_info->attributes[n],(const char *) attributes[i]); 5723 5744 CloneString(&value,attribute); 5724 5745 switch (*keyword) … … 5784 5805 break; 5785 5806 } 5786 else if (LocaleCompare((c har *) tag, "set") == 0)5807 else if (LocaleCompare((const char *) tag, "set") == 0) 5787 5808 { 5788 5809 if (msl_info->image[n] == (Image *) NULL) 5789 5810 { 5790 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 5811 ThrowMSLException(OptionError,"NoImagesDefined", 5812 (const char *) tag); 5791 5813 break; 5792 5814 } … … 5798 5820 keyword=(const char *) attributes[i++]; 5799 5821 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 5800 msl_info->attributes[n],(c har *) attributes[i]));5822 msl_info->attributes[n],(const char *) attributes[i])); 5801 5823 switch (*keyword) 5802 5824 { … … 5977 5999 break; 5978 6000 } 5979 if (LocaleCompare((c har *) tag,"shade") == 0)6001 if (LocaleCompare((const char *) tag,"shade") == 0) 5980 6002 { 5981 6003 Image … … 5990 6012 if (msl_info->image[n] == (Image *) NULL) 5991 6013 { 5992 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6014 ThrowMSLException(OptionError,"NoImagesDefined", 6015 (const char *) tag); 5993 6016 break; 5994 6017 } … … 5999 6022 keyword=(const char *) attributes[i++]; 6000 6023 attribute=InterpretImageProperties(msl_info->image_info[n], 6001 msl_info->attributes[n],(c har *) attributes[i]);6024 msl_info->attributes[n],(const char *) attributes[i]); 6002 6025 CloneString(&value,attribute); 6003 6026 switch (*keyword) … … 6067 6090 break; 6068 6091 } 6069 if (LocaleCompare((c har *) tag,"shadow") == 0)6092 if (LocaleCompare((const char *) tag,"shadow") == 0) 6070 6093 { 6071 6094 Image … … 6077 6100 if (msl_info->image[n] == (Image *) NULL) 6078 6101 { 6079 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6102 ThrowMSLException(OptionError,"NoImagesDefined", 6103 (const char *) tag); 6080 6104 break; 6081 6105 } … … 6085 6109 keyword=(const char *) attributes[i++]; 6086 6110 attribute=InterpretImageProperties(msl_info->image_info[n], 6087 msl_info->attributes[n],(c har *) attributes[i]);6111 msl_info->attributes[n],(const char *) attributes[i]); 6088 6112 CloneString(&value,attribute); 6089 6113 switch (*keyword) … … 6166 6190 break; 6167 6191 } 6168 if (LocaleCompare((c har *) tag,"sharpen") == 0)6192 if (LocaleCompare((const char *) tag,"sharpen") == 0) 6169 6193 { 6170 6194 double radius = 0.0, … … 6172 6196 6173 6197 if (msl_info->image[n] == (Image *) NULL) 6174 { 6175 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6176 break; 6177 } 6198 { 6199 ThrowMSLException(OptionError,"NoImagesDefined", 6200 (const char *) tag); 6201 break; 6202 } 6178 6203 /* 6179 6204 NOTE: sharpen can have no attributes, since we use all the defaults! … … 6185 6210 keyword=(const char *) attributes[i++]; 6186 6211 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 6187 msl_info->attributes[n],(c har *) attributes[i]));6212 msl_info->attributes[n],(const char *) attributes[i])); 6188 6213 switch (*keyword) 6189 6214 { … … 6234 6259 } 6235 6260 } 6236 else if (LocaleCompare((c har *) tag,"shave") == 0)6261 else if (LocaleCompare((const char *) tag,"shave") == 0) 6237 6262 { 6238 6263 /* init the values */ … … 6242 6267 if (msl_info->image[n] == (Image *) NULL) 6243 6268 { 6244 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6269 ThrowMSLException(OptionError,"NoImagesDefined", 6270 (const char *) tag); 6245 6271 break; 6246 6272 } … … 6251 6277 keyword=(const char *) attributes[i++]; 6252 6278 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 6253 msl_info->attributes[n],(c har *) attributes[i]));6279 msl_info->attributes[n],(const char *) attributes[i])); 6254 6280 switch (*keyword) 6255 6281 { … … 6320 6346 break; 6321 6347 } 6322 if (LocaleCompare((c har *) tag,"shear") == 0)6348 if (LocaleCompare((const char *) tag,"shear") == 0) 6323 6349 { 6324 6350 Image … … 6330 6356 if (msl_info->image[n] == (Image *) NULL) 6331 6357 { 6332 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6358 ThrowMSLException(OptionError,"NoImagesDefined", 6359 (const char *) tag); 6333 6360 break; 6334 6361 } … … 6338 6365 keyword=(const char *) attributes[i++]; 6339 6366 attribute=InterpretImageProperties(msl_info->image_info[n], 6340 msl_info->attributes[n],(c har *) attributes[i]);6367 msl_info->attributes[n],(const char *) attributes[i]); 6341 6368 CloneString(&value,attribute); 6342 6369 switch (*keyword) … … 6409 6436 break; 6410 6437 } 6411 if (LocaleCompare((c har *) tag,"signature") == 0)6438 if (LocaleCompare((const char *) tag,"signature") == 0) 6412 6439 { 6413 6440 /* … … 6416 6443 if (msl_info->image[n] == (Image *) NULL) 6417 6444 { 6418 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6445 ThrowMSLException(OptionError,"NoImagesDefined", 6446 (const char *) tag); 6419 6447 break; 6420 6448 } … … 6424 6452 keyword=(const char *) attributes[i++]; 6425 6453 attribute=InterpretImageProperties(msl_info->image_info[n], 6426 msl_info->attributes[n],(c har *) attributes[i]);6454 msl_info->attributes[n],(const char *) attributes[i]); 6427 6455 CloneString(&value,attribute); 6428 6456 switch (*keyword) … … 6439 6467 break; 6440 6468 } 6441 if (LocaleCompare((c har *) tag,"solarize") == 0)6469 if (LocaleCompare((const char *) tag,"solarize") == 0) 6442 6470 { 6443 6471 /* … … 6446 6474 if (msl_info->image[n] == (Image *) NULL) 6447 6475 { 6448 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6476 ThrowMSLException(OptionError,"NoImagesDefined", 6477 (const char *) tag); 6449 6478 break; 6450 6479 } … … 6455 6484 keyword=(const char *) attributes[i++]; 6456 6485 attribute=InterpretImageProperties(msl_info->image_info[n], 6457 msl_info->attributes[n],(c har *) attributes[i]);6486 msl_info->attributes[n],(const char *) attributes[i]); 6458 6487 CloneString(&value,attribute); 6459 6488 switch (*keyword) … … 6494 6523 break; 6495 6524 } 6496 if (LocaleCompare((c har *) tag,"spread") == 0)6525 if (LocaleCompare((const char *) tag,"spread") == 0) 6497 6526 { 6498 6527 Image … … 6504 6533 if (msl_info->image[n] == (Image *) NULL) 6505 6534 { 6506 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6535 ThrowMSLException(OptionError,"NoImagesDefined", 6536 (const char *) tag); 6507 6537 break; 6508 6538 } … … 6512 6542 keyword=(const char *) attributes[i++]; 6513 6543 attribute=InterpretImageProperties(msl_info->image_info[n], 6514 msl_info->attributes[n],(c har *) attributes[i]);6544 msl_info->attributes[n],(const char *) attributes[i]); 6515 6545 CloneString(&value,attribute); 6516 6546 switch (*keyword) … … 6558 6588 break; 6559 6589 } 6560 else if (LocaleCompare((c har *) tag,"stegano") == 0)6590 else if (LocaleCompare((const char *) tag,"stegano") == 0) 6561 6591 { 6562 6592 Image * … … 6564 6594 6565 6595 if (msl_info->image[n] == (Image *) NULL) 6566 { 6567 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6568 break; 6569 } 6596 { 6597 ThrowMSLException(OptionError,"NoImagesDefined", 6598 (const char *) tag); 6599 break; 6600 } 6570 6601 if (attributes == (const xmlChar **) NULL) 6571 6602 break; … … 6574 6605 keyword=(const char *) attributes[i++]; 6575 6606 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 6576 msl_info->attributes[n],(c har *) attributes[i]));6607 msl_info->attributes[n],(const char *) attributes[i])); 6577 6608 switch (*keyword) 6578 6609 { … … 6622 6653 ThrowMSLException(OptionError,"MissingWatermarkImage",keyword); 6623 6654 } 6624 else if (LocaleCompare((c har *) tag,"stereo") == 0)6655 else if (LocaleCompare((const char *) tag,"stereo") == 0) 6625 6656 { 6626 6657 Image * … … 6628 6659 6629 6660 if (msl_info->image[n] == (Image *) NULL) 6630 {6631 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag);6632 break;6633 }6661 { 6662 ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 6663 break; 6664 } 6634 6665 if (attributes == (const xmlChar **) NULL) 6635 6666 break; … … 6638 6669 keyword=(const char *) attributes[i++]; 6639 6670 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 6640 msl_info->attributes[n],(c har *) attributes[i]));6671 msl_info->attributes[n],(const char *) attributes[i])); 6641 6672 switch (*keyword) 6642 6673 { … … 6686 6717 ThrowMSLException(OptionError,"Missing stereo image",keyword); 6687 6718 } 6688 if (LocaleCompare((c har *) tag,"swap") == 0)6719 if (LocaleCompare((const char *) tag,"swap") == 0) 6689 6720 { 6690 6721 Image … … 6699 6730 if (msl_info->image[n] == (Image *) NULL) 6700 6731 { 6701 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6732 ThrowMSLException(OptionError,"NoImagesDefined", 6733 (const char *) tag); 6702 6734 break; 6703 6735 } … … 6709 6741 keyword=(const char *) attributes[i++]; 6710 6742 attribute=InterpretImageProperties(msl_info->image_info[n], 6711 msl_info->attributes[n],(c har *) attributes[i]);6743 msl_info->attributes[n],(const char *) attributes[i]); 6712 6744 CloneString(&value,attribute); 6713 6745 switch (*keyword) … … 6743 6775 if ((p == (Image *) NULL) || (q == (Image *) NULL)) 6744 6776 { 6745 ThrowMSLException(OptionError,"NoSuchImage",(c har *) tag);6777 ThrowMSLException(OptionError,"NoSuchImage",(const char *) tag); 6746 6778 break; 6747 6779 } … … 6752 6784 break; 6753 6785 } 6754 if (LocaleCompare((c har *) tag,"swirl") == 0)6786 if (LocaleCompare((const char *) tag,"swirl") == 0) 6755 6787 { 6756 6788 Image … … 6762 6794 if (msl_info->image[n] == (Image *) NULL) 6763 6795 { 6764 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6796 ThrowMSLException(OptionError,"NoImagesDefined", 6797 (const char *) tag); 6765 6798 break; 6766 6799 } … … 6770 6803 keyword=(const char *) attributes[i++]; 6771 6804 attribute=InterpretImageProperties(msl_info->image_info[n], 6772 msl_info->attributes[n],(c har *) attributes[i]);6805 msl_info->attributes[n],(const char *) attributes[i]); 6773 6806 CloneString(&value,attribute); 6774 6807 switch (*keyword) … … 6816 6849 break; 6817 6850 } 6818 if (LocaleCompare((c har *) tag,"sync") == 0)6851 if (LocaleCompare((const char *) tag,"sync") == 0) 6819 6852 { 6820 6853 /* … … 6823 6856 if (msl_info->image[n] == (Image *) NULL) 6824 6857 { 6825 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6858 ThrowMSLException(OptionError,"NoImagesDefined", 6859 (const char *) tag); 6826 6860 break; 6827 6861 } … … 6831 6865 keyword=(const char *) attributes[i++]; 6832 6866 attribute=InterpretImageProperties(msl_info->image_info[n], 6833 msl_info->attributes[n],(c har *) attributes[i]);6867 msl_info->attributes[n],(const char *) attributes[i]); 6834 6868 CloneString(&value,attribute); 6835 6869 switch (*keyword) … … 6851 6885 case 't': 6852 6886 { 6853 if (LocaleCompare((c har *) tag,"map") == 0)6887 if (LocaleCompare((const char *) tag,"map") == 0) 6854 6888 { 6855 6889 Image … … 6861 6895 if (msl_info->image[n] == (Image *) NULL) 6862 6896 { 6863 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 6897 ThrowMSLException(OptionError,"NoImagesDefined", 6898 (const char *) tag); 6864 6899 break; 6865 6900 } … … 6870 6905 keyword=(const char *) attributes[i++]; 6871 6906 attribute=InterpretImageProperties(msl_info->image_info[n], 6872 msl_info->attributes[n],(c har *) attributes[i]);6907 msl_info->attributes[n],(const char *) attributes[i]); 6873 6908 CloneString(&value,attribute); 6874 6909 switch (*keyword) … … 6882 6917 const char 6883 6918 *attribute; 6884 6919 6885 6920 attribute=GetImageProperty(msl_info->attributes[j],"id"); 6886 6921 if ((attribute != (const char *) NULL) && … … 6906 6941 break; 6907 6942 } 6908 else if (LocaleCompare((c har *) tag,"threshold") == 0)6943 else if (LocaleCompare((const char *) tag,"threshold") == 0) 6909 6944 { 6910 6945 /* init the values */ … … 6912 6947 6913 6948 if (msl_info->image[n] == (Image *) NULL) 6914 {6915 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag);6916 break;6917 }6949 { 6950 ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 6951 break; 6952 } 6918 6953 if (attributes == (const xmlChar **) NULL) 6919 6954 break; … … 6922 6957 keyword=(const char *) attributes[i++]; 6923 6958 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 6924 msl_info->attributes[n],(c har *) attributes[i]));6959 msl_info->attributes[n],(const char *) attributes[i])); 6925 6960 switch (*keyword) 6926 6961 { … … 6954 6989 } 6955 6990 } 6956 else if (LocaleCompare((c har *) tag, "transparent") == 0)6991 else if (LocaleCompare((const char *) tag, "transparent") == 0) 6957 6992 { 6958 6993 if (msl_info->image[n] == (Image *) NULL) 6959 {6960 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag);6961 break;6962 }6994 { 6995 ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 6996 break; 6997 } 6963 6998 if (attributes == (const xmlChar **) NULL) 6964 6999 break; … … 6967 7002 keyword=(const char *) attributes[i++]; 6968 7003 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 6969 msl_info->attributes[n],(char *) attributes[i]));7004 msl_info->attributes[n],(const char *) attributes[i])); 6970 7005 switch (*keyword) 6971 7006 { … … 6995 7030 break; 6996 7031 } 6997 else if (LocaleCompare((c har *) tag, "trim") == 0)7032 else if (LocaleCompare((const char *) tag, "trim") == 0) 6998 7033 { 6999 7034 if (msl_info->image[n] == (Image *) NULL) 7000 {7001 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag);7002 break;7003 }7035 { 7036 ThrowMSLException(OptionError,"NoImagesDefined",(const char *) tag); 7037 break; 7038 } 7004 7039 7005 7040 /* no attributes here */ … … 7029 7064 case 'w': 7030 7065 { 7031 if (LocaleCompare((c har *) tag,"write") == 0)7066 if (LocaleCompare((const char *) tag,"write") == 0) 7032 7067 { 7033 7068 if (msl_info->image[n] == (Image *) NULL) 7034 7069 { 7035 ThrowMSLException(OptionError,"NoImagesDefined",(char *) tag); 7070 ThrowMSLException(OptionError,"NoImagesDefined", 7071 (const char *) tag); 7036 7072 break; 7037 7073 } … … 7042 7078 keyword=(const char *) attributes[i++]; 7043 7079 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 7044 msl_info->attributes[n],(c har *) attributes[i]));7080 msl_info->attributes[n],(const char *) attributes[i])); 7045 7081 switch (*keyword) 7046 7082 { … … 7115 7151 case 'c': 7116 7152 { 7117 if (LocaleCompare((c har *) tag,"comment") == 0 )7153 if (LocaleCompare((const char *) tag,"comment") == 0 ) 7118 7154 { 7119 7155 (void) DeleteImageProperty(msl_info->image[n],"comment"); … … 7130 7166 case 'g': 7131 7167 { 7132 if (LocaleCompare((c har *) tag, "group") == 0 )7168 if (LocaleCompare((const char *) tag, "group") == 0 ) 7133 7169 { 7134 7170 if (msl_info->group_info[msl_info->number_groups-1].numImages > 0 ) … … 7152 7188 case 'i': 7153 7189 { 7154 if (LocaleCompare((c har *) tag, "image") == 0)7190 if (LocaleCompare((const char *) tag, "image") == 0) 7155 7191 MSLPopImage(msl_info); 7156 7192 break; … … 7159 7195 case 'l': 7160 7196 { 7161 if (LocaleCompare((c har *) tag,"label") == 0 )7197 if (LocaleCompare((const char *) tag,"label") == 0 ) 7162 7198 { 7163 7199 (void) DeleteImageProperty(msl_info->image[n],"label"); … … 7174 7210 case 'm': 7175 7211 { 7176 if (LocaleCompare((c har *) tag, "msl") == 0 )7212 if (LocaleCompare((const char *) tag, "msl") == 0 ) 7177 7213 { 7178 7214 /* … … 7397 7433 (void) LogMagickEvent(CoderEvent,GetMagickModule(), 7398 7434 " SAX.externalSubset(%s %s %s)",name, 7399 (external_id != (const xmlChar *) NULL ? (c har *) external_id : " "),7400 (system_id != (const xmlChar *) NULL ? (c har *) system_id : " "));7435 (external_id != (const xmlChar *) NULL ? (const char *) external_id : " "), 7436 (system_id != (const xmlChar *) NULL ? (const char *) system_id : " ")); 7401 7437 msl_info=(MSLInfo *) context; 7402 7438 parser=msl_info->parser; … … 7641 7677 % % 7642 7678 % % 7679 % S e t M S L A t t r i b u t e s % 7680 % % 7681 % % 7682 % % 7683 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7684 % 7685 % SetMSLAttributes() ... 7686 % 7687 % The format of the SetMSLAttributes method is: 7688 % 7689 % MagickBooleanType SetMSLAttributes(MSLInfo *msl_info, 7690 % const xmlChar **attributes) 7691 % 7692 % A description of each parameter follows: 7693 % 7694 % o msl_info: the MSL info. 7695 % 7696 % o attributes: the attribute list. 7697 % 7698 */ 7699 static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info, 7700 const xmlChar **attributes) 7701 { 7702 char 7703 *value; 7704 7705 const char 7706 *keyword; 7707 7708 ExceptionInfo 7709 *exception; 7710 7711 long 7712 n; 7713 7714 register long 7715 i; 7716 7717 assert(msl_info != (MSLInfo *) NULL); 7718 assert(exception != (ExceptionInfo *) NULL); 7719 if (attributes == (const xmlChar **) NULL) 7720 return(MagickTrue); 7721 exception=msl_info->exception; 7722 n=msl_info->n; 7723 for (i=0; (attributes[i] != (const xmlChar *) NULL); i++) 7724 { 7725 keyword=(const char *) attributes[i++]; 7726 CloneString(&value,InterpretImageProperties(msl_info->image_info[n], 7727 msl_info->attributes[n],(const char *) attributes[i])); 7728 switch (*keyword) 7729 { 7730 case 'B': 7731 case 'b': 7732 { 7733 if (LocaleCompare(keyword,"background") == 0) 7734 { 7735 (void) QueryColorDatabase(value, 7736 &msl_info->image_info[n]->background_color,exception); 7737 break; 7738 } 7739 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 7740 break; 7741 } 7742 case 'F': 7743 case 'f': 7744 { 7745 if (LocaleCompare(keyword,"fill") == 0) 7746 { 7747 (void) QueryColorDatabase(value,&msl_info->draw_info[n]->fill, 7748 exception); 7749 break; 7750 } 7751 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 7752 break; 7753 } 7754 case 'I': 7755 case 'i': 7756 { 7757 if (LocaleCompare(keyword,"id") == 0) 7758 { 7759 (void) SetImageProperty(msl_info->attributes[n],keyword,NULL); 7760 (void) SetImageProperty(msl_info->attributes[n],keyword,value); 7761 break; 7762 } 7763 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 7764 break; 7765 } 7766 case 'S': 7767 case 's': 7768 { 7769 if (LocaleCompare(keyword,"size") == 0) 7770 { 7771 CloneString(&msl_info->image_info[n]->size,value); 7772 break; 7773 } 7774 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword); 7775 break; 7776 } 7777 default: 7778 break; 7779 } 7780 } 7781 return(MagickTrue); 7782 } 7783 7784 /* 7785 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 7786 % % 7787 % % 7788 % % 7643 7789 % U n r e g i s t e r M S L I m a g e % 7644 7790 % %
