[MS4W-Users] Attempt to classify 24bit image
José Pedro Santos
zpsantos1 at hotmail.com
Tue Nov 6 11:44:35 EST 2012
> Date: Tue, 6 Nov 2012 11:59:51 -0400
> From: jmckenna at gatewaygeomatics.com
> To: ms4w-users at lists.maptools.org
> Subject: Re: [MS4W-Users] Attempt to classify 24bit image
>
> On 12-11-06 11:37 AM, José Pedro Santos wrote:
> > Dear all,
> >
> > I'm trying to visualize one image of 24bit image as WMS service but when
> > I try to use the function get map with output PNG I have this error:
> >
> > <ServiceExceptionReport version="1.1.1"><ServiceException>
> > msDrawMap(): Image handling error. Failed to draw layer named
> > 'africa_012003'.
> > drawGDAL(): Unable to access file. Attempt to classify 24bit image, this
> > is unsupported.
> > </ServiceException></ServiceExceptionReport>
> >
> > So, I change the mapfile "Imagetype" to png24 and the error was the same
> > mostly because I have to put IMAGEMODE PC256 because with RGB don't work.
> >
> > I already try to change to JPEG but when I do that said:
> > loadOutputFormat(): General error message. OUTPUTFORMAT clause
> > references driver GD/JPEG, but this driver isn't configured.
> >
> > Some ideas?
>
> Hello José,
>
> Are you configuring your different output formats with the OUTPUTFORMAT
> object? Many examples live at:
> http://www.mapserver.org/mapfile/outputformat.html Maybe you could
> paste your outputformat objects from your mapfile here for the mailing
> list to look at.
>
> -jeff
>
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
Many thanks for your reply Jeff,
I only have one layer so I just put only one Output (I don' t know if is correct like that). The mapfile worked fine with one raster image with 8bit and 1 band. This new file have 3 bands and is a 24bit image
MAP # Start of Mapfile
NAME "africa_012003"
STATUS ON
SIZE 600 400
EXTENT -31.269 -54.464 63.503 39.727
UNITS METERS
IMAGECOLOR 10 10 15
IMAGETYPE "png"
PROJECTION # parameter projection
"init=epsg:4326"
END # End of parameter projection
WEB # Parameter WEB
METADATA
"WMS_TITLE" "WMS Layers"
"WMS_ABSTRACT" "Service WMS for all layers inside PostgreSQL DB"
"WMS_ONLINERESOURCE" "http://localhost/cgi-bin/mapserv?map=var/www/africaraster2.map&"
"WMS_SRS" "EPSG:4326"
"WMS_ENABLE_REQUEST" "* !GetFeatureInfo"
"WMS_KEYWORDLIST" "Africa, Environment Models"
"WMS_CONTACTPERSON" "Santos"
END # End parameter Metadata
END # End parameter WEB
OUTPUTFORMAT # Parameter Outputformat
NAME "png"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END # End parameter Outputformat
....... On the LAYER.....
PROCESSING "NODATA=0"
PROCESSING "SCALE=AUTO"
PROCESSING "BANDS=1,2,3"
PROCESSING "DITHER=YES"
The OUTPUT when I choose GD/PNG said that is not supported but with AGG/PNG that error message disappear.
Best Regards
José Santos
>
> _______________________________________________
> 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/20121106/2415eb01/attachment.htm
More information about the MS4W-Users
mailing list