Mapserver/GD JPEGs
Jeff Hoffmann
jeff at PROPERTYKEY.COM
Tue Jun 27 06:16:00 PDT 2006
Stephen Davies wrote:
> Last week I posted a request regarding comments in JPEGs and their
> apparent effect on Motorola 3G telephones.
>
> Since then I have found that a) the issue seems to affect all WAP phones
> and b) it is not just comments that cause the problem.
>
> It seems that these devices can only handle very simple images and those
> generated by Mapserver/GD fall outside their capabilities.
>
> I have found that, as well as removing the comments from my map images,
> I have to go further.
>
> My current work-around is to use a PERL script to generate the map image
> to disk and then use the mogrify utility from Image Magik to "clean"
> it. The mogrify command is simply:
>
> mogrify -quality 100 image.jpg
>
> but whatever this does to the image is enough to make it displayable on
> a telephone when sent as an img src=.
>
> If anybody knows more about what is happening here and/or what the
> underlying problem is, I would love to hear it.
I don't really know a lot of details about what you're doing, but I do
know that in my experience, phones don't like progressive JPEGs so I
turn that option off (INTERLACE OFF for older versions or FORMATOPTION
"INTERLACE=OFF" for newer versions that use an OUTPUTFORMAT block). I
think it's enabled by default, so if you don't have an INTERLACE
setting, it's most likely creating progressive JPEGs. (I'd guess
mogrify may be re-encoding from progressive to non-progressive, and
that's why you're seeing the behavior you're seeing.)
--
Jeff Hoffmann
Head Plate Spinner
PropertyKey.com
More information about the MapServer-users
mailing list