[Mapserver-users] swf output color problem
Aaron D. Hunt
hunt at zedxinc.com
Thu Nov 13 09:13:55 PST 2003
This is a multi-part message in MIME format.
------=_NextPart_000_09BE_01C3A9DF.9BAC7E40
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I am trying to make a swf file with a single wms layer background. When =
I do the colors get reduced to what looks like 8 colors. The script I am =
using is below along with the map file. I can send the swf and a jpeg if =
anyone needs a sample of what is going on.
Aaron Hunt
#!/usr/bin/perl
use lib("/home/mapserver");
use mapscript40;
$ENV{MS_ERRORFILE} =3D "mapserver.log";=20
$ENV{PROJ_LIB} =3D "/home/mapserver/proj-4.4.7/nad/";=20
my $map =3D new mapscript40::mapObj("geotif.map") or die("Unable to open =
mapfile. $!");
$img =3D $map->draw() or die('Unable to draw map');
$imagename =3D "test.swf";
$img->save($imagename);
####map file
#
#
# Start of map file
#
NAME Soil
STATUS ON
SIZE 500 500
EXTENT -90.637762 33.623924 -90.601165 33.650091
#EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "/tmp"
IMAGECOLOR 255 255 255
WEB
IMAGEPATH "/home/hunt/"
IMAGEURL ""
END
PROJECTION
"proj=3Dlonglat"
"ellps=3DWGS84"
"unit=3Ddd"
END
OUTPUTFORMAT=20
NAME swf=20
MIMETYPE "application/x-shockwave-flash"=20
DRIVER swf=20
IMAGEMODE RGBA=20
FORMATOPTION "OUTPUT_MOVIE=3DMULTIPLE"=20
END=20
LAYER
NAME LandSat
METADATA
"wms_title" "LandSat"
"wms_srs" "EPSG:4326" #WGS 84
"wms_connectiontimeout" "10"
LYRNAME "LandSat"
LINK "N/A"
END
STATUS ON=20
TYPE RASTER
OFFSITE 255 255 255
CONNECTIONTYPE WMS
CONNECTION =
"http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&REQUEST=3Dmap&LAYERS=3Dus=
_landsat7o&red=3D4&green=3D3&blue=3D1&ld=3D25&le=3D45&ls=3D0&gamma=3D2.5&=
STYLES=3D&FORMAT=3Djpeg&TRANSPARENT=3DTRUE&"
PROJECTION
"init=3Depsg:4326" #WGS 84
END
END
END
------=_NextPart_000_09BE_01C3A9DF.9BAC7E40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I am trying to make a swf file with a =
single wms=20
layer background. When I do the colors get reduced to what looks like 8 =
colors.=20
The script I am using is below along with the map file. I can send the =
swf and a=20
jpeg if anyone needs a sample of what is going on.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Aaron Hunt</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>#!/usr/bin/perl</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>use lib("/home/mapserver");<BR>use=20
mapscript40;</FONT></DIV>
<DIV> </DIV><FONT face=3DArial size=3D2>
<DIV><BR>$ENV{MS_ERRORFILE} =3D "mapserver.log"; <BR>$ENV{PROJ_LIB} =3D=20
"/home/mapserver/proj-4.4.7/nad/"; </DIV>
<DIV> </DIV>
<DIV><BR>my $map =3D new mapscript40::mapObj("geotif.map") or =
die("Unable to open=20
mapfile. $!");</DIV>
<DIV> </DIV>
<DIV>$img =3D $map->draw() or die('Unable to draw map');</DIV>
<DIV> </DIV>
<DIV>$imagename =3D "test.swf";</DIV>
<DIV> </DIV>
<DIV>$img->save($imagename);</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>####map file</DIV>
<DIV> </DIV>
<DIV>#<BR>#<BR># Start of map file<BR>#<BR>NAME Soil<BR>STATUS =
ON<BR>SIZE 500=20
500<BR>EXTENT -90.637762 33.623924 -90.601165 33.650091<BR>#EXTENT -180 =
-90 180=20
90<BR>UNITS DD<BR>SHAPEPATH "/tmp"<BR>IMAGECOLOR 255 255 255</DIV>
<DIV> </DIV>
<DIV> WEB<BR> IMAGEPATH "/home/hunt/"<BR> =
IMAGEURL=20
""<BR> END</DIV>
<DIV> </DIV>
<DIV><BR> PROJECTION<BR> "proj=3Dlonglat"<BR> =
"ellps=3DWGS84"<BR> "unit=3Ddd"<BR> END</DIV>
<DIV> </DIV>
<DIV><BR> OUTPUTFORMAT=20
<BR> NAME swf=20
<BR> MIMETYPE=20
"application/x-shockwave-flash" =
<BR> =20
DRIVER swf <BR> IMAGEMODE RGBA =
<BR> FORMATOPTION=20
"OUTPUT_MOVIE=3DMULTIPLE" <BR> END </DIV>
<DIV> </DIV>
<DIV><BR> LAYER<BR> NAME =
LandSat<BR> =20
METADATA<BR> "wms_title"=20
"LandSat"<BR> "wms_srs" =
"EPSG:4326"=20
#WGS 84<BR> "wms_connectiontimeout"=20
"10"<BR> LYRNAME=20
"LandSat"<BR> LINK =
"N/A"<BR> =20
END<BR> STATUS ON <BR> TYPE=20
RASTER<BR> OFFSITE 255 255 255<BR> =20
CONNECTIONTYPE WMS<BR> CONNECTION "<A=20
href=3D"http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&REQUEST=3Dmap&=
amp;LAYERS=3Dus_landsat7o&red=3D4&green=3D3&blue=3D1&ld=3D=
25&le=3D45&ls=3D0&gamma=3D2.5&STYLES=3D&FORMAT=3Djpeg=
&TRANSPARENT=3DTRUE">http://wms.jpl.nasa.gov/wms.cgi?WMTVER=3D1.0.0&a=
mp;REQUEST=3Dmap&LAYERS=3Dus_landsat7o&red=3D4&green=3D3&=
blue=3D1&ld=3D25&le=3D45&ls=3D0&gamma=3D2.5&STYLES=3D=
&FORMAT=3Djpeg&TRANSPARENT=3DTRUE</A>&"<BR> =
=20
PROJECTION<BR> "init=3Depsg:4326" #WGS=20
84<BR> END<BR> END</DIV>
<DIV> </DIV>
<DIV>END</DIV>
<DIV> </DIV>
<DIV></FONT> </DIV>
<DIV> </DIV></BODY></HTML>
------=_NextPart_000_09BE_01C3A9DF.9BAC7E40--
More information about the MapServer-users
mailing list