MCPcopy Index your code
hub / github.com/MapServer/MapServer / msPostMapParseOutputFormatSetup

Function msPostMapParseOutputFormatSetup

mapoutput.c:124–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122/************************************************************************/
123
124int msPostMapParseOutputFormatSetup( mapObj *map )
125
126{
127 outputFormatObj *format;
128
129 /* If IMAGETYPE not set use the first user defined OUTPUTFORMAT.
130 If none, use the first default format. */
131 if( map->imagetype == NULL && map->numoutputformats > 0 )
132 map->imagetype = msStrdup(map->outputformatlist[0]->name);
133 if( map->imagetype == NULL)
134 map->imagetype = msStrdup(defaultoutputformats[0].name);
135
136 /* select the current outputformat into map->outputformat */
137 format = msSelectOutputFormat( map, map->imagetype );
138 if( format == NULL )
139 {
140 msSetError(MS_MISCERR,
141 "Unable to select IMAGETYPE `%s'.",
142 "msPostMapParseOutputFormatSetup()",
143 map->imagetype ? map->imagetype : "(null)" );
144 return MS_FAILURE;
145 }
146
147 msApplyOutputFormat( &(map->outputformat), format,
148 map->transparent, map->interlace, map->imagequality );
149
150 return MS_SUCCESS;
151}
152
153/************************************************************************/
154/* msCreateDefaultOutputFormat() */

Callers 3

loadMapInternalFunction · 0.85
msUpdateMapFromURLFunction · 0.85
msNewMapObjFunction · 0.85

Calls 4

msStrdupFunction · 0.85
msSelectOutputFormatFunction · 0.85
msSetErrorFunction · 0.85
msApplyOutputFormatFunction · 0.85

Tested by

no test coverage detected