[Mapserver-users] TRANSPARENCY problem

Ed McNierney ed at topozone.com
Mon Mar 10 16:46:36 EST 2003


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2E74E.861FD034
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Aaron -

=20

This subject was just discussed on this list - the title was
"COLOR_MATCH_THRESHOLD"

=20

If you are using GDAL to read your source raster data, add:

=20

PROCESSING "COLOR_MATCH_THRESHOLD=3D3"

=20

To the LAYER block for the orthos.  Alternatively, use the OUTPUTFORMAT
option to create a 24-bit output image.

=20

The basic problem is that you're running out of colors.  Your original
grayscale color image is (presumably) a 256-color (256 shades of gray)
image, and MapServer uses almost all available colors in an 8-bit
paletter to render it.  When it comes time to create NEW colors by
blending the highlight, there's no room.

=20

Think of it this way - a 256-color grayscale image with a transparent
red overlay can create up to 256 MORE colors, meaning a total of 512.

=20

            - Ed

=20

Ed McNierney

President and Chief Mapmaker

TopoZone.com / Maps a la carte, Inc.

73 Princeton Street, Suite 305

North Chelmsford, MA  01863

Phone: (978) 251-4242  Fax: (978) 251-1396

ed at topozone.com

=20

-----Original Message-----
From: Aaron D. Hunt [mailto:hunt at zedxinc.com]=20
Sent: Monday, March 10, 2003 3:39 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] TRANSPARENCY problem

=20

When I try to do a transparency of 50 on a ortho background with a red
polygon I get the attached?=20

=20

=20

Aaron D. Hunt


------_=_NextPart_001_01C2E74E.861FD034
Content-Type: text/html;
	charset="us-ascii"
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=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body bgcolor=3Dwhite lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Aaron &#8211;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>This subject was just discussed on this list &#8211; =
the title
was &#8220;COLOR_MATCH_THRESHOLD&#8221;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>If you are using GDAL to read your source raster =
data, add:</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'text-indent:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>PROCESSING
&quot;COLOR_MATCH_THRESHOLD=3D3&quot;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>To the LAYER block for the orthos.&nbsp; =
Alternatively, use
the OUTPUTFORMAT option to create a 24-bit output =
image.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>The basic problem is that you&#8217;re running out of
colors.&nbsp; Your original grayscale color image is (presumably) a =
256-color
(256 shades of gray) image, and MapServer uses almost all available =
colors in
an 8-bit paletter to render it.&nbsp; When it comes time to create NEW =
colors
by blending the highlight, there&#8217;s no room.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Think of it this way &#8211; a 256-color grayscale =
image
with a transparent red overlay can create up to 256 MORE colors, meaning =
a
total of 512.</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;</span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; -
Ed</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<div>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
 10.0pt;font-family:Arial;color:navy'>Ed McNierney</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>President and Chief =
Mapmaker</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>TopoZone.com / Maps a la carte, =
Inc.</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>73 Princeton Street, Suite =
305</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>North Chelmsford, MA&nbsp; =
01863</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Phone: (978) 251-4242&nbsp; Fax: =
(978)
251-1396</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>ed at topozone.com</span></font></p>

</div>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Aaron D. Hunt
[mailto:hunt at zedxinc.com] <br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Monday, March 10, =
2003 3:39
PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b>
mapserver-users at lists.gis.umn.edu<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> =
[Mapserver-users]
TRANSPARENCY problem</span></font></p>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>&nbsp;</span></font></p>

<div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>When I try to do a =
transparency of
50 on a ortho background with a red polygon I get the =
attached?&nbsp;</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'>&nbsp;</span></font></p>

</div>

<div>

<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial'>Aaron D. =
Hunt</span></font></p>

</div>

</div>

</body>

</html>
=00
------_=_NextPart_001_01C2E74E.861FD034--



More information about the mapserver-users mailing list