mapbox / mbutil

Importer and Exporter of MBTiles
http://mapbox.com/developers/
BSD 3-Clause "New" or "Revised" License
755 stars 198 forks source link

Export to other format than png doesnt work #61

Closed wirthual closed 7 years ago

wirthual commented 9 years ago

mb-util ~/Desktop/Leaflet/hh.mbtiles ~/Desktop/Leaflet/Test2 --image_format jpg

Creates files with the extension .jpg but they are no jpegs. screenshot from 2014-12-24 14 56 20

If you rename the files to .png they work.

johndpope commented 8 years ago

the data in sqlite is png to begin with - you need to use something like imagemagick to convert https://github.com/icetan/sqlitepipe

UPDATE images SET tile_data=pipe('convert -format jpg -quality 90% png:- jpg:-', tile_data); VACUUM images;

tmcw commented 7 years ago

Thanks for the question! Since this is a common question, I've added it to the FAQ: can mbutil convert image formats?