5

Is there any way to convert .jpeg to .tiff file?

If yes, then how to do that?

There are many library in Python that can convert file from one format to another.

But, I have not found anything for this problem.

Thanks in advance!

jony
  • 924
  • 10
  • 25

3 Answers3

9

see this

from PIL import Image
im = Image.open('yourImg.jpg')
im.save("pathToSave/hello.tiff", 'TIFF')
Coder
  • 1,129
  • 10
  • 24
1

You can use PIL (Python Imaging Library) for this:

import Image
im = Image.open('test.jpg')
im.save('test.tiff')  # or 'test.tif'

Also, this was the first result for your problem on Google, make sure you google extensively first.

qBen_Plays
  • 262
  • 2
  • 9
1

According to OpenCV docs for functions used for image and video reading and writing imread does support JPEG files and imwrite can save TIFF files, though with some limitations:

Only 8-bit (or 16-bit unsigned (CV_16U) in case of PNG, JPEG 2000, and TIFF) single-channel or 3-channel (with ‘BGR’ channel order) images can be saved using this function.

Daweo
  • 31,313
  • 3
  • 12
  • 25