Hi all, To optimize the output format image and improve the time of answer, we try to modify the type of image according to the type of layer. In fact, in the config.ini we define the output image to png (better for vector layer) and we want to modifie automatically the output image to jpeg (better for raster layer) when a raster layer is selected in the toc tree. Why? -> When a vector layer is selected the output png image size is about 30 ko and if a raster is selected the output png image size is about 500 ko. The same example in jpeg output size is about 120 ko in all case but quality is less than png.
So is there anyone have work to this? Resize automatically the map to the windows is very good update... Thanks Regards. Fran?ois PINET -------------- section suivante -------------- Une pi?ce jointe HTML a ?t? enlev?e... URL: http://www.faunalia.com/pipermail/pmapper-users/attachments/20051214/a1edac14/attachment.htm From [EMAIL PROTECTED] Wed Dec 14 21:38:17 2005 From: [EMAIL PROTECTED] (Armin Burger) Date: Wed Dec 14 21:38:51 2005 Subject: [Pmapper-users] Optimization image output format In-Reply-To: <[EMAIL PROTECTED]> References: <[EMAIL PROTECTED]> Message-ID: <[EMAIL PROTECTED]> Fran?ois, It's not really a lot effort to implement this. The easiest solution would be to add that to the 'setGroups()' function. This way you have it available at once also for printing. Collect all layers that are set to MS_ON in an array and check that at the end if a raster layer is included. If yes, set the $_SESSION['imgFormat'] to JPEG, otherwise to PNG. For more flexibility you should define a default image format and one for the case of raster layers visible (because one might want to use GIF instead of PNG). To be more flexible would require a definition of layers that should change the format if they're status is MS_ON. You could have eg. scanned black/white maps that are also raster layers but are smaller when in png (and look better) than in JPEG. Also thematic raster layers (like DEM/slopes, landuse raster data) using CLASS definitions in Mapserver are normally better displayed in PNG than JPEG. I typically use just JPEG as standard format because at work we have very often imagery included anyway. Armin Fran?ois PINET wrote: > Hi all, > > To optimize the output format image and improve the time of answer, we > try to modify the type of image according to the type of layer. > In fact, in the config.ini we define the output image to png (better for > vector layer) and we want to modifie automatically the output image to > jpeg (better for raster layer) when a raster layer is selected in the > toc tree. > Why? -> When a vector layer is selected the output png image size is > about 30 ko and if a raster is selected the output png image size is > about 500 ko. The same example in jpeg output size is about 120 ko in > all case but quality is less than png. > > So is there anyone have work to this? > > Resize automatically the map to the windows is very good update... > > Thanks > Regards. > > Fran?ois PINET > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pmapper-users mailing list > [EMAIL PROTECTED] > http://faunalia.it/cgi-bin/mailman/listinfo/pmapper-users
