No. TileCache saves the image with a .jpg extension but uses 'jpeg' for the mime type of the returned content. The underlying library, PIL, will do that automagically for you.
Cheers Paul On 25-Oct-07, at 8:53 AM, Jachym Cepicky wrote: > Hi, > > no, if I understand it right, TileCache will always save the files > with > extension "jpeg", while OpenLayers will always request "jpg" files. > > Jachym > > > Paul Spencer píše v Čt 25. 10. 2007 v 08:49 -0400: >> Jachym, >> >> if I understand it correctly, the image saved on disk has an >> extension of .jpg while the mime type returned by the web server with >> a JPEG image is image/jpeg. So the code is fine and is doing the >> right thing. You just need to specify the correct extension in >> OpenLayers (either 'jpg' or 'jpeg' will do) and in TileCache config >> (again, probably either will do). >> >> Paul >> >> On 25-Oct-07, at 7:57 AM, Jachym Cepicky wrote: >> >>> Hi, >>> >>> in OpenLayers.Layer.Tilecache, around line 55, there is >>> >>> this.extension = (this.extension == 'jpeg') ? 'jpg' : >>> this.extension; >>> >>> in tilecache/TileCache/Layer.py, around line 80, there is >>> >>> if extension.lower() == 'jpg': extension = 'jpeg' # MIME >>> >>> IMHO, it does not make sense, if I understand this well, you can >>> never >>> access JPEG TileCache from OpenLayers >>> >>> Do I understand it well? >>> >>> Thanks >>> >>> Jachym >>> -- >>> Jachym Cepicky >>> e-mail: [EMAIL PROTECTED] >>> URL: http://les-ejk.cz >>> GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://openlayers.org/mailman/listinfo/dev >> >> +-----------------------------------------------------------------+ >> |Paul Spencer [EMAIL PROTECTED] | >> +-----------------------------------------------------------------+ >> |Chief Technology Officer | >> |DM Solutions Group Inc http://www.dmsolutions.ca/ | >> +-----------------------------------------------------------------+ >> >> >> >> >> > -- > Jachym Cepicky > e-mail: [EMAIL PROTECTED] > URL: http://les-ejk.cz > GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub > +-----------------------------------------------------------------+ |Paul Spencer [EMAIL PROTECTED] | +-----------------------------------------------------------------+ |Chief Technology Officer | |DM Solutions Group Inc http://www.dmsolutions.ca/ | +-----------------------------------------------------------------+ _______________________________________________ Dev mailing list [email protected] http://openlayers.org/mailman/listinfo/dev
