Stephen Davies wrote:
My latest addition to my Mapserver application is a 3G phone interface.

However, it seems that at least the Motorola 3vx phone cannot handle comments in JPEG images.
The images generated by Mapserver/gd have the comment:
CREATOR:gd-jpeg V1.0 (using IJG JPEG v62), quality=80
and the phone refuses to display them.
If I manually remove the comment with gimp, the images display perfectly.

Does anybody know how to stop Mapserver/gd from including the comment?

Stephen,

As far as I know, you would need to patch the version of GD you are using.
If you look in GD's gd_jpeg.c file you should see a code segment like:

  jpeg_start_compress (&cinfo, TRUE);

  sprintf (comment, "CREATOR: gd-jpeg v%s (using IJG JPEG v%d),",
           GD_JPEG_VERSION, JPEG_LIB_VERSION);
  if (quality >= 0)
    sprintf (comment + strlen (comment), " quality = %d\n", quality);
  else
    strcat (comment + strlen (comment), " default quality\n");
  jpeg_write_marker (&cinfo, JPEG_COM, (unsigned char *) comment,
                     (unsigned int) strlen (comment));
  if (im->trueColor)
    {
  ...

try changing this to:

  jpeg_start_compress (&cinfo, TRUE);
  if (im->trueColor)
    {
  ...

Quite a lame "feature" of the phone if you were to ask me!

Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org

Reply via email to