| 122 | /************************************************************************/ |
| 123 | |
| 124 | int 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() */ |
no test coverage detected