| 561 | /************************************************************************/ |
| 562 | |
| 563 | int msGetOutputFormatIndex(mapObj *map, const char *imagetype) |
| 564 | { |
| 565 | int i; |
| 566 | /* -------------------------------------------------------------------- */ |
| 567 | /* Try to find the format in the maps list of formats, first by */ |
| 568 | /* mime type, and then by output format name. */ |
| 569 | /* -------------------------------------------------------------------- */ |
| 570 | for (i = 0; i < map->numoutputformats; i++) |
| 571 | { |
| 572 | if (map->outputformatlist[i]->mimetype != NULL |
| 573 | && strcasecmp(imagetype, |
| 574 | map->outputformatlist[i]->mimetype) == 0 ) |
| 575 | return i; |
| 576 | } |
| 577 | |
| 578 | for( i = 0; i < map->numoutputformats; i++ ) |
| 579 | { |
| 580 | if( strcasecmp(imagetype,map->outputformatlist[i]->name) == 0 ) |
| 581 | return i; |
| 582 | } |
| 583 | |
| 584 | return -1; |
| 585 | } |
| 586 | |
| 587 | /************************************************************************/ |
| 588 | /* msSelectOutputFormat() */ |
no test coverage detected