[Mapserver-users] JPEG input

Jan Hartmann jhart at frw.uva.nl
Wed Apr 2 10:05:38 EST 2003


No, that didn't work either. I created a library in 
gdal-1.1.8\frmts\jpeg (lib out:libjpeg.lib *.obj) and linked GD 2.0.11 
against this library, instead of the original libjpeg.lib. Then I 
recompiled MapServer, and got the same result.

Norman Vine pointed me to a recent posting by Daniel Morissette on this 
problem,

http://lists.gis.umn.edu/pipermail/mapserver-users/2003-January/000657.html

and a bugzilla item in

http://mapserver.gis.umn.edu/bugs/show_bug.cgi?id=203

The problem is more difficult than stated there: recompiling MapServer 
without -DUSE_JPEG didn't help. Neither did compiling GD with the JPEG 
routines from GDAL. Finally, it is NOT a Windows problem: Apache on 
Linux came with the same error, although with a different size (464 
instead of 520)

 >> JPEG parameter struct mismatch: library thinks size is 464, caller
 >> expects 464

As a last resort I completely removed GDAL from the build and tried to 
display the jpeg image. This time I got the error message:

 >> msDrawRasterLayer(): General error message. Attempt to render raster
 >> layer to IMAGEMODE RGB or RGBA but without GDAL available. 24bit
 >> output requires GDAL

I'm out of my depth.

Jan


Ed McNierney wrote:
> Jan -
> 
> No, you need to eliminate the two different JPEG libraries from the build.  In your case, that means modifying the GD build to link with the GDAL JPEG library.
> 
> 	- Ed
> 
> -----Original Message-----
> From: Jan Hartmann [mailto:jhart at frw.uva.nl]
> Sent: Wednesday, April 02, 2003 8:28 AM
> To: Ed McNierney
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: Re: [Mapserver-users] JPEG input
> 
> 
> I did that too! I commented out the three lines for JPEG support in 
> MapServer's Makefile.vc, but the result was the same.
> 
> Jan
> 
> Ed McNierney wrote:
> 
>>Jan -
>>
>>Please forgive my incomplete recollection, but I ran into this same problem a long time ago.  It appears that the JPEG library inside GDAL is built slightly differently than the default jpeg-6b library (although it's the same version), and the two are not compatible.  I suspected it was a structure packing/alignment issue (i.e. the files are the same but they're compiled differently).  I decided not to look into it and simply use the JPEG support from GDAL and remove the jpeg-6b library from my build.  That fixed the problem.
>>
>>	- Ed
>>
>>Ed McNierney
>>President and Chief Mapmaker
>>TopoZone.com / Maps a la carte, Inc.
>>73 Princeton Street, Suite 305
>>North Chelmsford, MA  01863
>>ed at topozone.com
>>(978) 251-4242 
>>
>>-----Original Message-----
>>From: Jan Hartmann [mailto:jhart at frw.uva.nl]
>>Sent: Wednesday, April 02, 2003 6:19 AM
>>To: mapserver-users at lists.gis.umn.edu
>>Subject: [Mapserver-users] JPEG input
>>
>>
>>Hello,
>>
>>I'm trying to display a jpeg input image and get the following error 
>>message:
>>
>>JPEG parameter struct mismatch: library thinks size is 432, caller 
>>expects 464
>>
>>Platform: Win2000, VC++
>>Mapserver: CVS, compiled with and without JPEG input support (jpeg-6b)
>>GD: 2.0.11, compiled with jpeg-6b
>>GDAL: 1.1.8
>>
>>I diffed the jpeg files under GDAL with the jpeg-6b distribution and 
>>found no differences. Yet there seems to be a version mismatch 
>>somewhere. Outputting JPEG is no problem. Has anyone any ideas?
>>
>>Jan
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 




More information about the mapserver-users mailing list