[Tilecache] [OpenLayers-Dev] jpeg vs jpg

Paul Spencer pspencer at dmsolutions.ca
Thu Oct 25 08:49:06 EDT 2007


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: jachym.cepicky at gmail.com
> URL: http://les-ejk.cz
> GPG: http://www.les-ejk.cz/pgp/jachym_cepicky-gpg.pub
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+








More information about the Tilecache mailing list