On Tue, Apr 26, 2011 at 11:46 AM, Mark Korver <span dir="ltr"><<a href="mailto:mwkorver@gmail.com">mwkorver@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Maybe you can just define the layer 2X in the mapfile.  Put the<br>
altered layer on top of the regular layer? I am assuming that you can<br>
get the good values to be transparent and not white.<br></blockquote><br>Thanks Mark! This works great.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div></div><div class="h5"><br>
On Tue, Apr 26, 2011 at 11:57 AM, Matt Bartolome <<a href="mailto:mattxbart@gmail.com">mattxbart@gmail.com</a>> wrote:<br>
> Hello,<br>
> I have a funky raster I'm trying to tile as jpegs. For whatever reason this<br>
> RGB raster has white pixels on the source raster which should be black. Is<br>
> it possible to set only these white pixels to be black on the output jpeg? I<br>
> was playing around with the CLASS directive. This sets all those white<br>
> pixels to black, but it does not preserve the rest of the rgb that I want to<br>
> use; those "good" values are not processed and show as blank (white) space.<br>
> How do I do this? I thought of preprocessing this with gdalwarp but the<br>
> raster becomes too large (source is an ecw) on output so need to do it<br>
> on-the-fly with mapserver (I'm using mapserver trunk and gdal 1.8 on linux).<br>
><br>
> Thanks!<br>
> Matt<br>
><br>
> OUTPUTFORMAT<br>
>     NAME jpeg<br>
>     DRIVER "AGG/JPEG"<br>
>     MIMETYPE "image/jpeg"<br>
>     IMAGEMODE RGB<br>
>     EXTENSION "jpg"<br>
> END<br>
><br>
> LAYER<br>
>   NAME "test"<br>
>   TYPE RASTER<br>
>   STATUS ON<br>
>   DATA "/test.tif"<br>
><br>
>   PROJECTION<br>
>     "init=epsg:2230"<br>
>   END<br>
><br>
>   PROCESSING "NODATA=255"<br>
><br>
>   CLASS<br>
>     NAME "set white to black"<br>
>     EXPRESSION ([red] = 255 AND [green] = 255 AND [blue] = 255)<br>
>     STYLE<br>
>     COLOR 0 0 0<br>
>   END<br>
><br>
> END<br>
><br>
</div></div>> _______________________________________________<br>
> mapserver-users mailing list<br>
> <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
><br>
><br>
</blockquote></div><br>