[Mapserver-users] setting interlace in phpmapscript 41

Grant, Ryan rgrant at nrcan.gc.ca
Mon Feb 16 14:44:26 EST 2004


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3F4C5.48A9DE14
Content-Type: text/plain

Hey there, 

I'm undergoing the transition from mapserver 3.6 to 4.1. I'm having problems
setting the interlace attribute of my image objects. Unfortunately, I don't
have "INTERLACE off" written into my map files, and as we have many many map
files, I'm trying to avoid running the bbedit script to do so.

Ok, so my mapscript 3.6 code looked like this: 

$image = $map->draw();
$image_url=$image->saveWebImage(MS_JPEG,1,0,90);

but now that I've upgraded, I see that the saveWebImage no longer takes
parameters, so I've changed my code to this:

$map->selectOutputformat("JPEG");
$map->set(interlace,0);
$map->set(imagequality,10);

$image = $map->draw();
$image_url=$image->saveWebImage();


Now, part of that works, because it is changing my image to a jpg (it's
written as  GIF in the map file), however the interlace and imagequality
properties don't seem to be going through.

Any help would be greatly appreciated!

Ryan




------_=_NextPart_001_01C3F4C5.48A9DE14
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2655.35">
<TITLE>setting interlace in phpmapscript  41</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">Hey there, </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">I'm undergoing the transition from =
mapserver 3.6 to 4.1. I'm having problems setting the interlace =
attribute of my image objects. Unfortunately, I don't have =
&quot;INTERLACE off&quot; written into my map files, and as we have =
many many map files, I'm trying to avoid running the bbedit script to =
do so.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Ok, so my mapscript 3.6 code looked =
like this: </FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">$image =3D $map-&gt;draw();</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">$image_url=3D$image-&gt;saveWebImage(MS_JPEG,1,0,90);</FO=
NT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">but now that I've upgraded, I see that =
the saveWebImage no longer takes parameters, so I've changed my code to =
this:</FONT>
</P>

<P><FONT SIZE=3D2 =
FACE=3D"Arial">$map-&gt;selectOutputformat(&quot;JPEG&quot;);</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">$map-&gt;set(interlace,0);</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">$map-&gt;set(imagequality,10);</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">$image =3D $map-&gt;draw();</FONT>
<BR><FONT SIZE=3D2 =
FACE=3D"Arial">$image_url=3D$image-&gt;saveWebImage();</FONT>
</P>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Now, part of that works, because it is =
changing my image to a jpg (it's written as&nbsp; GIF in the map file), =
however the interlace and imagequality properties don't seem to be =
going through.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Any help would be greatly =
appreciated!</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Ryan</FONT>
</P>
<BR>
<BR>

</BODY>
</HTML>
------_=_NextPart_001_01C3F4C5.48A9DE14--



More information about the mapserver-users mailing list