Frank, Thanks! it was just what I needed! I only have to set the expression to a higher value - [pixel] < 150 - to render all the pixels I want.
Thanks again! Cumps, Pedro Frank Warmerdam-2 wrote: > > On 10/1/07, Pedro Mendes <[EMAIL PROTECTED]> wrote: >> Hi people, >> >> I´m trying to display a raster layer from a tileindex file (.shp). The >> source rasters for this shapefile are jpeg with the following info: > ... >> My prob is that i can´t force mapserver only to render the black color in >> the rasters (i tried changing several parameters in the layer object, and >> using different output declarations). If it´s possible can u show it to >> me? >> >> The output format isn´t important, just wanna get fully transparent >> layers >> (in colors grey and white, keeping black). > > Pedro, > > My understanding is that you want black (0,0,0) in your > source raster to be rendered, and all other values to be > treated as transparent ... is that right? > > The only mechanism that comes to mind to accomplish > this is to define a class for pixel value 0 with a color > of 0,0,0 and no other classes so all other values will > appear as transparent. Something like: > > CLASS > EXPRESSION ([pixel] = 0) > COLOR 0 0 0 > END > > You may find that the source jpeg file has corrupted some > black pixels causing them to have values near zero but not > quite equal to zero. to capture these too, you might change > your expression to be something like [pixel] < 5. > > Good luck, > -- > ---------------------------------------+-------------------------------------- > I set the clouds in motion - turn up | Frank Warmerdam, > [EMAIL PROTECTED] > light and sound - activate the windows | http://pobox.com/~warmerdam > and watch the world go round - Rush | Geospatial Programmer for Rent > > -- View this message in context: http://www.nabble.com/Transparent-raster-layer-%28with-Jpegs-source-rasters%29-tf4549266.html#a12996665 Sent from the Mapserver - User mailing list archive at Nabble.com.
