ImageType / OutputFormat

Dylan Keon keon at NACSE.ORG
Tue Aug 17 14:32:35 EDT 2004


Tanya,

I do this for the same reason you mentioned - keeping the images small
unless they really need to be 24-bit.  I'm not sure if it can be done
via the mapfile, but if you're using MapScript you can do it pretty easily.

        //PHP example

        $layer = $map->getLayerByName('color_shaded_relief');

        if( $layer->status == 1 ) {   //layer is ON
                $map->selectOutputformat('png24');
        }

Where 'png24' is a 24-bit OUTPUTFORMAT definition.

--Dylan


On 08/17/2004 10:56 AM, TC Haddad wrote:
> I'm experimenting with some of the ImageType / OutputFormat options that
> are available now that our project is migrating to MS 4.2 (from 3.6), and I
> am wondering if it is possible to have multiple OutputFormats apply in the
> same mapfile?
>
> So far I have only been able to change the output of the entire mapfile,
> but it would be nice to have different formats apply to different
> Layers/Groups. So that if only vector layers are being drawn we can use
> PC256, but if rasters or a combination of both are called we can use RGB or
> RGBA. Is this possible? This would be a nice option because it would keep
> the majority of the images produced small, and reserve the features of
> RGB/RGBA for the layers that really benefit from them.
>
> Tanya



More information about the mapserver-users mailing list