[MS4W-Users] Image 24 Bit

José Pedro Santos zpsantos1 at hotmail.com
Mon Nov 26 10:55:54 EST 2012


Dear all,

I try do change like Jeff propose but I can't succeed..I get always the following error: 

<ServiceExceptionReport version="1.1.1"><ServiceException>
msDrawMap(): Image handling error. Failed to draw layer named 'fapartest'.
drawGDAL(): Unable to access file. Attempt to classify 24bit image, this is unsupported.
</ServiceException></ServiceExceptionReport>

With this link: http://localhost/cgi-bin/mapserv?map=/var/www/africarastercrt.map&VERSION=1.1.1&Request=GetMap&LAYERS=fapartest&STYLES=&SRS=EPSG:4326&BBOX=-26.0057,-34.8229,60.0032,38.0053&WIDTH=700&HEIGHT=500&FORMAT=image/png;mode=24bit

But I make some tests and I don't think that is OUTPUTFORMAT that have the error. I have on the LAYER section this parameter: PROCESSING "BANDS=1,2,3 
because my image is a RGB image (0 - 255) but when I put only one band or two bands the result is the color from the first band (like explain on the raster data access) but only the color and not the layer. I have the outformat and the class parameter like this: 

OUTPUTFORMAT # Parameter Output
 NAME png24
 DRIVER "AGG/PNG"
 MIMETYPE "image/png;mode=24bit"
 EXTENSION PNG
 IMAGEMODE RGB
END # end of parameter Output


CLASS
  NAME "near white"
  EXPRESSION ([red] > 200 AND [green] > 200 AND [blue] > 200)
  STYLE
    COLOR 0 0 255
END # end parameter style
END # end parameter class

I working with this since a long time and I don't understand why.. Also I have another raster image with just one band and works fine...any ideas/suggestions??

Best Regards and thanks,
José Santos


> Date: Fri, 23 Nov 2012 15:43:24 -0400
> From: jmckenna at gatewaygeomatics.com
> To: ms4w-users at lists.maptools.org
> Subject: Re: [MS4W-Users] Image 24 Bit
> 
> Jose, see response below from Mike.
> 
> (I also regularly use AGG/PNG for 24bit, as that was my first response
> earlier...sorry just trying to debug for Jose..hard for me without the
> data in my hands)
> 
> -jeff
> 
> 
> 
> On 12-11-23 3:37 PM, Smith, Michael ERDC-RDE-CRREL-NH wrote:
> > Jeff,
> > 
> > That¹s only for reading imagery.
> > 
> > AGG/PNG renderer will certainly do 24 bit output. I use (in cgi mode)
> > map_imagetype=png24,
> > 
> > For a wms image request, one should use format=image/png;mode=24bit
> > 
> > Mike
> > 
> 
> 
> 
> -- 
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
> 
> 
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20121126/881b3f98/attachment.htm 


More information about the MS4W-Users mailing list