[mapserver-users] Image 24bits

Brent Fraser bfraser at geoanalytic.com
Fri Nov 30 07:36:09 PST 2012


After looking into the Mapserver code, the answer is simply "Classifying 
a 24 bit image is not currently supported in Mapserver".

Perhaps the doc 
(http://mapserver.org/input/raster.html#how-are-rasters-added-to-a-map-file) 
could be a little clearer.  Mapserver supports raster variables of 
[red], [green],and [blue] in a CLASS EXPRESSION, but these work only on 
the color values of palette of an 8-bit paletted image. Classifying a 24 
bit image is not supported.

Other than performance (and since each pixel would have to be put 
through the CLASS filters, it would be nasty), there's no reason I can 
see not to classify a 24 bit (or higher?) image; somebody just needs to 
write the code... :)

Best Regards,
Brent Fraser

On 11/28/2012 8:41 AM, Brent Fraser wrote:
> As I mentioned in the MS4W list, it sounds like a bug in Mapserver: 
> WMS + Mapserver-with-CLASS + 24bit-raster-in-PostGIS = error
>
> You may want to show your mapfile here to get some feedback from 
> others more experienced in using raster from PostGIS...
>
> Best Regards,
> Brent Fraser
>
> On 11/23/2012 10:07 AM, Saint wrote:
>> Dear all,
>>
>> I'm attempting to classify images of 24 bits but I always have the error
>> saying this: ........Unable to access file. Attempt to classify 24bit 
>> image,
>> this is unsupported.
>>
>> My Mapfile is this one:
>>
>> ...........
>>
>> IMAGETYPE "png24"
>>
>> ..........
>>
>> OUTPUTFORMAT # Parameter Output
>>   NAME png24
>>   DRIVER "GD/PNG"
>>   MIMETYPE "image/png"
>>   EXTENSION PNG
>>   IMAGEMODE RGBA
>>   TRANSPARENT ON
>> END # end of parameter Output
>>
>>
>> and in the expression in the browser of GetMap is FORMAT=image/png
>>
>> In the Layer description I have the special processing directives to
>> processed the 3 bands. But If put just 2 appear one empty image not the
>> error. I already read some documentation but I can't succeed.
>>
>> any idea?
>>
>> Many thanks and best regards,
>>
>> José Santos
>>
>>
>>
>> -----
>> José Santos
>> GIS Analyst
>> -- 
>> View this message in context: 
>> http://osgeo-org.1560.n6.nabble.com/Image-24bits-tp5018436.html
>> Sent from the Mapserver - User mailing list archive at Nabble.com.
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list