Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to develop a web portal that will show the images dynamically produced by qgis . but qgis provided tiff images are too big in size and it is not possible to show it on website using image viewers. That's why I have decided to convert those tiff images into jpg/jpeg to reduce in size as well as browser friendly so that I can show those images on my website easily. But I don't know how to convert tiff images into jpg/jpeg using gdal commands.

Please help me in this regard. thanks in advance.


share|improve this question
two questions: 1) do you want only to change(convert) the image type from tiff to jpg or do you also want to resize? 2)which operating system do you use? – Kurt May 26 '12 at 15:22
I also want to resize and I'm using ubuntu – Enamul Haque May 26 '12 at 17:13

try this with gdal:

gdal_translate -of JPEG -scale -co worldfile=yes input.tiff output.jpg

it also create worldfile too...

i hope it helps you...

share|improve this answer
thanks to those who commented on my post. Aragon your solution worked for me – Enamul Haque May 26 '12 at 17:22
one more thing how can I do it dynamically so that I can show the image on the website – Enamul Haque May 26 '12 at 17:42


Choose Raster menu - Conversion - Translate (Convert format). Then choose *Input file* for the image You want to convert. Under the *Output file* You can choose the format You need. There is .jpg too (with some 20+ file types).

I got 40MB large .tiff file, after conversion its only 1,6 MB as .jpg.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.