** utility function to write an output format structure to file */
| 4376 | ** utility function to write an output format structure to file |
| 4377 | */ |
| 4378 | static void writeOutputformatobject(FILE *stream, int indent, outputFormatObj *outputformat) |
| 4379 | { |
| 4380 | int i = 0; |
| 4381 | if(!outputformat) return; |
| 4382 | |
| 4383 | indent++; |
| 4384 | writeBlockBegin(stream, indent, "OUTPUTFORMAT"); |
| 4385 | writeString(stream, indent, "NAME", NULL, outputformat->name); |
| 4386 | writeString(stream, indent, "MIMETYPE", NULL, outputformat->mimetype); |
| 4387 | writeString(stream, indent, "DRIVER", NULL, outputformat->driver); |
| 4388 | writeString(stream, indent, "EXTENSION", NULL, outputformat->extension); |
| 4389 | writeKeyword(stream, indent, "IMAGEMODE", outputformat->imagemode, 7, MS_IMAGEMODE_PC256, "PC256", MS_IMAGEMODE_RGB, "RGB", MS_IMAGEMODE_RGBA, "RGBA", MS_IMAGEMODE_INT16, "INT16", MS_IMAGEMODE_FLOAT32, "FLOAT32", MS_IMAGEMODE_BYTE, "BYTE", MS_IMAGEMODE_FEATURE, "FEATURE"); |
| 4390 | writeKeyword(stream, indent, "TRANSPARENT", outputformat->transparent, 2, MS_TRUE, "TRUE", MS_FALSE, "FALSE"); |
| 4391 | for (i=0; i<outputformat->numformatoptions; i++) |
| 4392 | writeString(stream, indent, "FORMATOPTION", NULL, outputformat->formatoptions[i]); |
| 4393 | writeBlockEnd(stream, indent, "OUTPUTFORMAT"); |
| 4394 | writeLineFeed(stream); |
| 4395 | } |
| 4396 | |
| 4397 | |
| 4398 | /* |
no test coverage detected