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