[mapserver-users] Reference Map must be a GIF????

Worth Lutz wal3 at mindspring.com
Thu May 12 06:37:07 PDT 2011


An update after building a test case:

I was based my original email on finding out that the "jpg" format was not
handled by MapServer v6.  Upon reading the manuals (version 6.0 in trunk and
old paper copy) I saw only "gif" was supposed to be used.  I saw I was using
both "jpg" and "png" in MapServer v5.6.6 and earlier.

The attached test case shows that both "gif" and "png" reference maps work
in MapServer version 6.0.  The "jpg" does not.  The "jpg" does work in
version 5.6.6.  

The MapServer Error given in v6.0.0 for "jpg" is "readImage(): unsupported
pixmap format".  There is no error message for the caught exception.
Originally I was not looking at the MapServer error object when catching the
exceptions but in this case (and some others) I found that the thrown
exception has no message.

To test, unpack the files in the server and run refMapTest.php from a
browser.  You should see three reference maps on v5.6.6 and two reference
maps and some errors on v6.0.0.

I do not know what is expected of MapServer in this case.  I can live
without "jpg".  That is what was given me by the customer but I can change
it to "gif".  Maybe only the documentation needs be updated to add "png" and
exclude "jpg".  I've been using "png" when drawing reference maps myself
with MapServer.


Thanks,
Worth Lutz
 
-----Original Message-----
From: thomas bonfort [mailto:thomas.bonfort at gmail.com] 
Sent: Thursday, May 12, 2011 3:48 AM
To: Worth Lutz
Cc: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Reference Map must be a GIF????

looking through the code, both GD and the other renderers should
support loading GIF and PNG images. (This also concerns pixmap
symbols, legend icons, etc... i.e. anything which requires loading an
image file outside of GDAL)

Can you supply the and the reference image you are using ?

regards,
thomas

On Fri, May 6, 2011 at 20:18, Worth Lutz <wal3 at mindspring.com> wrote:
> When did the restriction, “the Reference Map base image must be a .gif”,
> start being enforced?
>
>
>
> I now see it in my old printed copy (version 5.2) of the documentation.  I
> checked there to see if this was new to MapServer version 6 as I found it
> first in the online documentation.  Obviously I had never read the
> documentation closely in this area.
>
>
>
> All my reference maps are “png” drawn with Mapserver (aggpng I think) and
> work in version 5.6.
>
>
>
> When my try/catch throws an exception trying to draw this reference map,
the
> exception message is an empty string.
>
>
>
> Through testing and looking at the apache logs, I find that there are
> MapServer Errors in the MapServer errorObj and PHP Notices and Warning.
> These are:
>
>
>
> [Mapserver Error] msDrawREferenceMap() : error loading reference image
> /data/mapfiles/ref_maps/

>
> [MapServer Error] readImage(): unsupported pixmap format/n in 

>
>
>
> Is this truly a change in the image type restriction for Reference Maps or
> is it just an change in the checking for errors when the
MapScriptException
> was added?
>
>
>
> Was I just lucky my “.png” reference maps worked in the past?  Am I the
only
> one to try this?  I don’t have many to convert but wanted to point this
out
> so it could be added to the Migration Guide if it must remain a
restriction.
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1375 / Virus Database: 1500/3630 - Release Date: 05/11/11
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refmaptest.tar.gz
Type: application/x-gzip
Size: 51265 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110512/29031948/attachment.bin>


More information about the MapServer-users mailing list