Lines Matching refs:file
189 static void JSONFormatLocaleFile(FILE *file,const char *format, in JSONFormatLocaleFile() argument
207 (void) FormatLocaleFile(file,format,"null"); in JSONFormatLocaleFile()
245 (void) FormatLocaleFile(file,format,"null"); in JSONFormatLocaleFile()
311 (void) FormatLocaleFile(file,format,escaped_json); in JSONFormatLocaleFile()
404 static ssize_t PrintChannelFeatures(FILE *file,const PixelChannel channel, in PrintChannelFeatures() argument
518 n=FormatLocaleFile(file,FeaturesFormat,name, in PrintChannelFeatures()
533 (void) FormatLocaleFile(file," }"); in PrintChannelFeatures()
535 (void) FormatLocaleFile(file,","); in PrintChannelFeatures()
536 (void) FormatLocaleFile(file,"\n"); in PrintChannelFeatures()
540 static ssize_t PrintChannelLocations(FILE *file,const Image *image, in PrintChannelLocations() argument
569 (void) FormatLocaleFile(file," \"%s\": {\n \"intensity\": " in PrintChannelLocations()
600 (void) FormatLocaleFile(file,",\n"); in PrintChannelLocations()
601 (void) FormatLocaleFile(file," \"location%.20g\": {\n" in PrintChannelLocations()
611 (void) FormatLocaleFile(file,"\n }"); in PrintChannelLocations()
613 (void) FormatLocaleFile(file,","); in PrintChannelLocations()
614 (void) FormatLocaleFile(file,"\n"); in PrintChannelLocations()
618 static ssize_t PrintChannelMoments(FILE *file,const PixelChannel channel, in PrintChannelMoments() argument
628 n=FormatLocaleFile(file," \"%s\": {\n",name); in PrintChannelMoments()
629 n+=FormatLocaleFile(file," \"centroid\": {\n " in PrintChannelMoments()
634 n+=FormatLocaleFile(file," \"ellipseSemiMajorMinorAxis\": {\n" in PrintChannelMoments()
639 n+=FormatLocaleFile(file," \"ellipseAngle\": %.*g,\n", in PrintChannelMoments()
641 n+=FormatLocaleFile(file," \"ellipseEccentricity\": %.*g,\n", in PrintChannelMoments()
643 n+=FormatLocaleFile(file," \"ellipseIntensity\": %.*g,\n", in PrintChannelMoments()
646 n+=FormatLocaleFile(file," \"I%.20g\": %.*g,\n",i+1.0, in PrintChannelMoments()
648 n+=FormatLocaleFile(file," \"I%.20g\": %.*g\n",i+1.0, in PrintChannelMoments()
650 (void) FormatLocaleFile(file," }"); in PrintChannelMoments()
652 (void) FormatLocaleFile(file,","); in PrintChannelMoments()
653 (void) FormatLocaleFile(file,"\n"); in PrintChannelMoments()
657 static ssize_t PrintChannelPerceptualHash(Image *image,FILE *file, in PrintChannelPerceptualHash() argument
666 (void) FormatLocaleFile(file," \"colorspaces\": [ "); in PrintChannelPerceptualHash()
669 (void) FormatLocaleFile(file,"\"%s\"",CommandOptionToMnemonic( in PrintChannelPerceptualHash()
672 (void) FormatLocaleFile(file,", "); in PrintChannelPerceptualHash()
674 (void) FormatLocaleFile(file,"],\n"); in PrintChannelPerceptualHash()
684 n=FormatLocaleFile(file," \"Channel%.20g\": {\n",(double) channel); in PrintChannelPerceptualHash()
690 n+=FormatLocaleFile(file," \"PH%.20g\": [",(double) j+1); in PrintChannelPerceptualHash()
693 n+=FormatLocaleFile(file,"%.*g",GetMagickPrecision(), in PrintChannelPerceptualHash()
696 n+=FormatLocaleFile(file,", "); in PrintChannelPerceptualHash()
698 n+=FormatLocaleFile(file,"]"); in PrintChannelPerceptualHash()
700 n+=FormatLocaleFile(file,",\n"); in PrintChannelPerceptualHash()
703 n+=FormatLocaleFile(file,"\n },\n"); in PrintChannelPerceptualHash()
705 n+=FormatLocaleFile(file,"\n }\n"); in PrintChannelPerceptualHash()
709 static ssize_t PrintChannelStatistics(FILE *file,const PixelChannel channel, in PrintChannelStatistics() argument
721 n=FormatLocaleFile(file,StatisticsFormat,name,GetMagickPrecision(), in PrintChannelStatistics()
732 (void) FormatLocaleFile(file,","); in PrintChannelStatistics()
733 (void) FormatLocaleFile(file,"\n"); in PrintChannelStatistics()
737 static void EncodeIptcProfile(FILE *file,const StringInfo *profile) in EncodeIptcProfile() argument
884 (void) FormatLocaleFile(file," \"%s[%.20g,%.20g]\": ", in EncodeIptcProfile()
887 (void) FormatLocaleFile(file,"null,"); in EncodeIptcProfile()
890 (void) FormatLocaleFile(file,"["); in EncodeIptcProfile()
896 (void) FormatLocaleFile(file,","); in EncodeIptcProfile()
897 JSONFormatLocaleFile(file,"%s",value->values[j][k]); in EncodeIptcProfile()
905 (void) FormatLocaleFile(file,"],\n"); in EncodeIptcProfile()
913 static MagickBooleanType EncodeImageAttributes(Image *image,FILE *file, in EncodeImageAttributes() argument
984 JSONFormatLocaleFile(file,"{\n \"image\": {\n \"name\": %s,\n", in EncodeImageAttributes()
993 JSONFormatLocaleFile(file," \"baseName\": %s,\n",filename); in EncodeImageAttributes()
995 JSONFormatLocaleFile(file," \"format\": %s,\n",image->magick); in EncodeImageAttributes()
999 JSONFormatLocaleFile(file," \"formatDescription\": %s,\n", in EncodeImageAttributes()
1003 JSONFormatLocaleFile(file," \"mimeType\": %s,\n",GetMagickMimeType( in EncodeImageAttributes()
1005 JSONFormatLocaleFile(file," \"class\": %s,\n",CommandOptionToMnemonic( in EncodeImageAttributes()
1007 (void) FormatLocaleFile(file," \"geometry\": {\n" in EncodeImageAttributes()
1015 (void) FormatLocaleFile(file," \"baseGeometry\": {\n" in EncodeImageAttributes()
1020 (void) FormatLocaleFile(file," \"resolution\": {\n" in EncodeImageAttributes()
1023 (void) FormatLocaleFile(file," \"printSize\": {\n" in EncodeImageAttributes()
1028 JSONFormatLocaleFile(file," \"units\": %s,\n",CommandOptionToMnemonic( in EncodeImageAttributes()
1031 JSONFormatLocaleFile(file," \"type\": %s,\n",CommandOptionToMnemonic( in EncodeImageAttributes()
1034 JSONFormatLocaleFile(file," \"baseType\": %s,\n", in EncodeImageAttributes()
1036 JSONFormatLocaleFile(file," \"endianess\": %s,\n", in EncodeImageAttributes()
1066 (void) FormatLocaleFile(file," \"channel%s\": {\n",locate); in EncodeImageAttributes()
1068 (void) PrintChannelLocations(file,image,AlphaPixelChannel,"Alpha", in EncodeImageAttributes()
1075 (void) PrintChannelLocations(file,image,RedPixelChannel,"Red", in EncodeImageAttributes()
1077 (void) PrintChannelLocations(file,image,GreenPixelChannel,"Green", in EncodeImageAttributes()
1079 (void) PrintChannelLocations(file,image,BluePixelChannel,"Blue", in EncodeImageAttributes()
1085 (void) PrintChannelLocations(file,image,CyanPixelChannel,"Cyan", in EncodeImageAttributes()
1087 (void) PrintChannelLocations(file,image,MagentaPixelChannel, in EncodeImageAttributes()
1089 (void) PrintChannelLocations(file,image,YellowPixelChannel,"Yellow", in EncodeImageAttributes()
1091 (void) PrintChannelLocations(file,image,BlackPixelChannel,"Black", in EncodeImageAttributes()
1098 (void) PrintChannelLocations(file,image,GrayPixelChannel,"Gray", in EncodeImageAttributes()
1103 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1110 JSONFormatLocaleFile(file," \"colorspace\": %s,\n", in EncodeImageAttributes()
1138 (void) FormatLocaleFile(file," \"depth\": %g,\n",(double) depth); in EncodeImageAttributes()
1139 (void) FormatLocaleFile(file," \"baseDepth\": %g,\n",(double) in EncodeImageAttributes()
1141 (void) FormatLocaleFile(file," \"channelDepth\": {\n"); in EncodeImageAttributes()
1143 (void) FormatLocaleFile(file," \"alpha\": %.20g,\n",(double) in EncodeImageAttributes()
1150 (void) FormatLocaleFile(file," \"red\": %.20g,\n",(double) in EncodeImageAttributes()
1152 (void) FormatLocaleFile(file," \"green\": %.20g,\n",(double) in EncodeImageAttributes()
1154 (void) FormatLocaleFile(file," \"blue\": %.20g\n",(double) in EncodeImageAttributes()
1160 (void) FormatLocaleFile(file," \"cyan\": %.20g,\n",(double) in EncodeImageAttributes()
1162 (void) FormatLocaleFile(file," \"magenta\": %.20g,\n",(double) in EncodeImageAttributes()
1164 (void) FormatLocaleFile(file," \"yellow\": %.20g,\n",(double) in EncodeImageAttributes()
1166 (void) FormatLocaleFile(file," \"black\": %.20g\n",(double) in EncodeImageAttributes()
1173 (void) FormatLocaleFile(file," \"gray\": %.20g\n",(double) in EncodeImageAttributes()
1178 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1185 (void) FormatLocaleFile(file," \"pixels\": %.20g,\n", in EncodeImageAttributes()
1190 (void) FormatLocaleFile(file," \"imageStatistics\": {\n"); in EncodeImageAttributes()
1191 (void) PrintChannelStatistics(file,(PixelChannel) MaxPixelChannels, in EncodeImageAttributes()
1193 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1195 (void) FormatLocaleFile(file," \"channelStatistics\": {\n"); in EncodeImageAttributes()
1197 (void) PrintChannelStatistics(file,AlphaPixelChannel,"Alpha",1.0/scale, in EncodeImageAttributes()
1204 (void) PrintChannelStatistics(file,RedPixelChannel,"Red",1.0/scale, in EncodeImageAttributes()
1206 (void) PrintChannelStatistics(file,GreenPixelChannel,"Green",1.0/ in EncodeImageAttributes()
1208 (void) PrintChannelStatistics(file,BluePixelChannel,"Blue",1.0/scale, in EncodeImageAttributes()
1214 (void) PrintChannelStatistics(file,CyanPixelChannel,"Cyan",1.0/scale, in EncodeImageAttributes()
1216 (void) PrintChannelStatistics(file,MagentaPixelChannel,"Magenta",1.0/ in EncodeImageAttributes()
1218 (void) PrintChannelStatistics(file,YellowPixelChannel,"Yellow",1.0/ in EncodeImageAttributes()
1220 (void) PrintChannelStatistics(file,BlackPixelChannel,"Black",1.0/ in EncodeImageAttributes()
1227 (void) PrintChannelStatistics(file,GrayPixelChannel,"Gray",1.0/scale, in EncodeImageAttributes()
1232 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1238 (void) FormatLocaleFile(file," \"channelMoments\": {\n"); in EncodeImageAttributes()
1240 (void) PrintChannelMoments(file,AlphaPixelChannel,"Alpha",MagickTrue, in EncodeImageAttributes()
1247 (void) PrintChannelMoments(file,RedPixelChannel,"Red",MagickTrue, in EncodeImageAttributes()
1249 (void) PrintChannelMoments(file,GreenPixelChannel,"Green",MagickTrue, in EncodeImageAttributes()
1251 (void) PrintChannelMoments(file,BluePixelChannel,"Blue",MagickFalse, in EncodeImageAttributes()
1257 (void) PrintChannelMoments(file,CyanPixelChannel,"Cyan",MagickTrue, in EncodeImageAttributes()
1259 (void) PrintChannelMoments(file,MagentaPixelChannel,"Magenta", in EncodeImageAttributes()
1261 (void) PrintChannelMoments(file,YellowPixelChannel,"Yellow", in EncodeImageAttributes()
1263 (void) PrintChannelMoments(file,BlackPixelChannel,"Black", in EncodeImageAttributes()
1270 (void) PrintChannelMoments(file,GrayPixelChannel,"Gray",MagickFalse, in EncodeImageAttributes()
1275 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1281 (void) FormatLocaleFile(file," \"channelPerceptualHash\": {\n"); in EncodeImageAttributes()
1282 (void) PrintChannelPerceptualHash(image,file,channel_phash); in EncodeImageAttributes()
1283 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1289 (void) FormatLocaleFile(file," \"channelFeatures\": {\n"); in EncodeImageAttributes()
1291 (void) PrintChannelFeatures(file,AlphaPixelChannel,"Alpha",MagickTrue, in EncodeImageAttributes()
1298 (void) PrintChannelFeatures(file,RedPixelChannel,"Red",MagickTrue, in EncodeImageAttributes()
1300 (void) PrintChannelFeatures(file,GreenPixelChannel,"Green", in EncodeImageAttributes()
1302 (void) PrintChannelFeatures(file,BluePixelChannel,"Blue",MagickFalse, in EncodeImageAttributes()
1308 (void) PrintChannelFeatures(file,CyanPixelChannel,"Cyan",MagickTrue, in EncodeImageAttributes()
1310 (void) PrintChannelFeatures(file,MagentaPixelChannel,"Magenta", in EncodeImageAttributes()
1312 (void) PrintChannelFeatures(file,YellowPixelChannel,"Yellow", in EncodeImageAttributes()
1314 (void) PrintChannelFeatures(file,BlackPixelChannel,"Black", in EncodeImageAttributes()
1321 (void) PrintChannelFeatures(file,GrayPixelChannel,"Gray",MagickFalse, in EncodeImageAttributes()
1326 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1331 (void) FormatLocaleFile(file," \"totalInkDensity\": \"%.*g%%\",\n", in EncodeImageAttributes()
1363 (void) FormatLocaleFile(file," \"alpha\": \"%s\",\n",color); in EncodeImageAttributes()
1371 (void) FormatLocaleFile(file," \"colormapEntries\": %.20g,\n", in EncodeImageAttributes()
1373 (void) FormatLocaleFile(file," \"colormap\": [\n "); in EncodeImageAttributes()
1378 (void) FormatLocaleFile(file,"\"%s\"",color); in EncodeImageAttributes()
1380 (void) FormatLocaleFile(file,","); in EncodeImageAttributes()
1382 (void) FormatLocaleFile(file,"\n "); in EncodeImageAttributes()
1385 (void) FormatLocaleFile(file,"\n ],\n"); in EncodeImageAttributes()
1388 (void) FormatLocaleFile(file," \"meanErrorPerPixel\": %g,\n", in EncodeImageAttributes()
1391 (void) FormatLocaleFile(file," \"normalizedMeanError\": %g,\n", in EncodeImageAttributes()
1394 (void) FormatLocaleFile(file," \"normalizedMaximumError\": %g,\n", in EncodeImageAttributes()
1396 JSONFormatLocaleFile(file," \"renderingIntent\": %s,\n", in EncodeImageAttributes()
1400 (void) FormatLocaleFile(file," \"gamma\": %g,\n",image->gamma); in EncodeImageAttributes()
1409 (void) FormatLocaleFile(file," \"chromaticity\": {\n"); in EncodeImageAttributes()
1410 (void) FormatLocaleFile(file," \"redPrimary\": {\n" in EncodeImageAttributes()
1413 (void) FormatLocaleFile(file," \"greenPrimary\": {\n" in EncodeImageAttributes()
1417 (void) FormatLocaleFile(file," \"bluePrimary\": {\n" in EncodeImageAttributes()
1420 (void) FormatLocaleFile(file," \"whitePrimary\": {\n" in EncodeImageAttributes()
1423 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1426 (void) FormatLocaleFile(file," \"tileGeometry\": {\n" in EncodeImageAttributes()
1432 (void) FormatLocaleFile(file," \"matteColor\": \"%s\",\n",color); in EncodeImageAttributes()
1434 (void) FormatLocaleFile(file," \"backgroundColor\": \"%s\",\n",color); in EncodeImageAttributes()
1436 (void) FormatLocaleFile(file," \"borderColor\": \"%s\",\n",color); in EncodeImageAttributes()
1438 (void) FormatLocaleFile(file," \"transparentColor\": \"%s\",\n",color); in EncodeImageAttributes()
1439 JSONFormatLocaleFile(file," \"interlace\": %s,\n",CommandOptionToMnemonic( in EncodeImageAttributes()
1441 JSONFormatLocaleFile(file," \"intensity\": %s,\n",CommandOptionToMnemonic( in EncodeImageAttributes()
1443 JSONFormatLocaleFile(file," \"compose\": %s,\n", in EncodeImageAttributes()
1447 (void) FormatLocaleFile(file," \"pageGeometry\": {\n" in EncodeImageAttributes()
1453 (void) FormatLocaleFile(file," \"originGeometry\": \"%+.20g%+.20g\",\n", in EncodeImageAttributes()
1455 JSONFormatLocaleFile(file," \"dispose\": %s,\n", in EncodeImageAttributes()
1458 (void) FormatLocaleFile(file," \"delay\": \"%.20gx%.20g\",\n", in EncodeImageAttributes()
1461 (void) FormatLocaleFile(file," \"iterations\": %.20g,\n",(double) in EncodeImageAttributes()
1464 (void) FormatLocaleFile(file," \"scene\": %.20g,\n \"scenes\": " in EncodeImageAttributes()
1468 (void) FormatLocaleFile(file," \"scene\": %.20g,\n",(double) in EncodeImageAttributes()
1470 JSONFormatLocaleFile(file," \"compression\": %s,\n", in EncodeImageAttributes()
1474 (void) FormatLocaleFile(file," \"quality\": %.20g,\n",(double) in EncodeImageAttributes()
1476 JSONFormatLocaleFile(file," \"orientation\": %s,\n", in EncodeImageAttributes()
1480 JSONFormatLocaleFile(file," \"montage\": \"%s\",\n",image->montage); in EncodeImageAttributes()
1501 (void) FormatLocaleFile(file," \"montageDirectory\": ["); in EncodeImageAttributes()
1510 JSONFormatLocaleFile(file,"{\n \"name\": %s", in EncodeImageAttributes()
1517 (void) FormatLocaleFile(file," }"); in EncodeImageAttributes()
1520 (void) FormatLocaleFile(file,",\n \"info\": \"%.20gx%.20g %s\"", in EncodeImageAttributes()
1528 JSONFormatLocaleFile(file,",\n %s: ",property); in EncodeImageAttributes()
1530 JSONFormatLocaleFile(file,"%s",value); in EncodeImageAttributes()
1535 (void) FormatLocaleFile(file,"\n },"); in EncodeImageAttributes()
1537 (void) FormatLocaleFile(file,"\n }"); in EncodeImageAttributes()
1539 (void) FormatLocaleFile(file,"],\n"); in EncodeImageAttributes()
1557 (void) FormatLocaleFile(file," \"properties\": {\n"); in EncodeImageAttributes()
1561 (void) FormatLocaleFile(file,",\n"); in EncodeImageAttributes()
1562 JSONFormatLocaleFile(file," %s: ",property); in EncodeImageAttributes()
1564 JSONFormatLocaleFile(file,"%s",value); in EncodeImageAttributes()
1567 (void) FormatLocaleFile(file,"\n },\n"); in EncodeImageAttributes()
1576 JSONFormatLocaleFile(file," \"clipping path\": %s,\n",value); in EncodeImageAttributes()
1592 (void) FormatLocaleFile(file," \"profiles\": {\n"); in EncodeImageAttributes()
1599 (void) FormatLocaleFile(file,",\n"); in EncodeImageAttributes()
1600 JSONFormatLocaleFile(file," %s: {\n",name); in EncodeImageAttributes()
1602 EncodeIptcProfile(file,profile); in EncodeImageAttributes()
1603 (void) FormatLocaleFile(file," \"length\": %.20g",(double) in EncodeImageAttributes()
1605 (void) FormatLocaleFile(file,"\n }"); in EncodeImageAttributes()
1608 (void) FormatLocaleFile(file,"\n },\n"); in EncodeImageAttributes()
1621 (void) FormatLocaleFile(file," \"artifacts\": {\n"); in EncodeImageAttributes()
1625 (void) FormatLocaleFile(file,",\n"); in EncodeImageAttributes()
1626 JSONFormatLocaleFile(file," %s: ",artifact); in EncodeImageAttributes()
1628 JSONFormatLocaleFile(file,"%s",value); in EncodeImageAttributes()
1631 (void) FormatLocaleFile(file,"\n },\n"); in EncodeImageAttributes()
1643 (void) FormatLocaleFile(file," \"registry\": {\n"); in EncodeImageAttributes()
1648 (void) FormatLocaleFile(file,",\n"); in EncodeImageAttributes()
1649 JSONFormatLocaleFile(file," %s: ",registry); in EncodeImageAttributes()
1652 JSONFormatLocaleFile(file,"%s",value); in EncodeImageAttributes()
1655 (void) FormatLocaleFile(file," },\n"); in EncodeImageAttributes()
1657 (void) FormatLocaleFile(file," \"tainted\": %s,\n", in EncodeImageAttributes()
1661 JSONFormatLocaleFile(file," \"filesize\": %s,\n",format); in EncodeImageAttributes()
1666 JSONFormatLocaleFile(file," \"numberPixels\": %s,\n",format); in EncodeImageAttributes()
1669 JSONFormatLocaleFile(file," \"pixelsPerSecond\": %s,\n",format); in EncodeImageAttributes()
1670 (void) FormatLocaleFile(file," \"userTime\": \"%0.3fu\",\n",user_time); in EncodeImageAttributes()
1671 (void) FormatLocaleFile(file," \"elapsedTime\": \"%lu:%02lu.%03lu\",\n", in EncodeImageAttributes()
1676 JSONFormatLocaleFile(file," \"version\": %s\n",url); in EncodeImageAttributes()
1678 (void) FormatLocaleFile(file," }\n}\n"); in EncodeImageAttributes()
1679 (void) fflush(file); in EncodeImageAttributes()
1680 return(ferror(file) != 0 ? MagickFalse : MagickTrue); in EncodeImageAttributes()
1687 *file; in WriteJSONImage() local
1710 file=GetBlobFileHandle(image); in WriteJSONImage()
1711 if (file == (FILE *) NULL) in WriteJSONImage()
1712 file=stdout; in WriteJSONImage()
1721 (void) EncodeImageAttributes(image,file,exception); in WriteJSONImage()