Convert tiff to jpeg?

Hi

Is it possible to convert .tiff files to jpeg files while maintaining the same directory or same folder structure but different location?

I mean like (on a larger scale like hundreds folders and .tiff images)

Orginal file directory

A:\Pictures->2019->Holiday (hundreds .tiff images)

To

Convert file directory

E:\Pictures->2019->Holiday->(hundreds .jpeg images

Tiff files would be converted to jpeg files and the folder structure would remain the same.

use duckduckgo and search for
imagemagick convert tiff to jpg file

I suppose this is Windows? You have A:\Pictures with subdirectory tree with tiff files, and you want E:\Pictures with the same subdirectory tree and images, but converting tiff to jpg. Correct?

I would use ImageMagick (IM). “mogrify” can easily convert all files in one directory but can’t recurse through directories, so we need a shell loop. As we need a loop, I would loop through all the files in all the directories using plain “magick” without “mogrify”:

magick {indir}{filename}.tiff {outdir}{filename}.jpg

IM can’t create directories, so we need to do that first, in a “for” loop.

Is that enough to get you going?

I don’t think RT is the right tool for that. IrfanView can do batch conversion. Since you change the format files don’t get overwritten. Not sure you can set a different folder, you possibly can, if not, just move them to a different folder.

I think I already did that with XnviewMP (free but not FLOSS).
In batch convert, select “folder” to be able to choose an input folder.
Output folders are created as needed.

You could edit the Queue output directory, and point to a specific place.

As explained in the Queue settings documentation page of Rawpedia, if you have a 3 folders deep path you could try writing:

E:/%d3/%d2/%d1/%f

But you will have to:

  • edit the queue path again when you develop and export raw images (I guess you export them to tiff in the original path)
  • take into account that the slashes may be written the linux way or the Windows way (that is / or \)
  • if you don’t want to edit those hundreds of files, then apply a neutral profile to all of them, and then while still selected, add them to the queue from the File Browser (remember that RT is not meant to be a plain converter, so be sure you don’t apply some default processing to your tiff files)

Hope it helps

Edit: upon re-reading your question, it seems that those tiff images are inside several different folders, instead of all of them in a single folder. If that is the case, then you would have to go folder after folder sending the images to the queue, so in that situation it’s better to use any of the other suggestions, I’m afraid.

2 Likes

Be careful with IrfanView! If you use it to convert the images, make sure you disable colour management (options – zoom/colour management). Otherwise IrfanView transforms the colour space to the monitor profile, which ruins the colours.

Here is an example of a scan of an IT8-target. I assigned the ICC-profile to the scan and rendered it in RT into sRGB colour space, which got the sRGB-ICC-profile embedded. Then I opened the TIF in IrfanView and saved it again as a TIF. It lost its ICC-profile and the colours got changed as you can see from a ratio image (saved in IrfanView / original):

At left is the ratio image, at right its histogram (in grey is the log histogram). The orange-red border corresponds to a ratio of 1.03.

If colour management is disabled, the colours on your screen may be wrong, but the output is correct. The same procedure as above produces a ratio image with all pixels set to 1.

Hermann-Josef

1 Like

rawproc’s img command line program will do this:

/home/glenn/bunchabigtiffs$ img "*.tif" "../nicelysizedjpegs/*.jpg"

The quoted parameters are required to keep the shell from having first dibs on the wildcards…

I’m looking for a program like this: https://sourceforge.net/projects/bulkimageconver/

That program is perfect but you cannot adjust the jpeg quality settings and the program does not automatically create a folder like “Jpeg versions” to every each image folder you want to convert (like E:\Pictures->2019->Holiday->“Jpeg versions” folder". However, the idea is exactly what I’m looking for.

I’d just get comfy with imagemagik if I were you.

If you want simple and powerful go XnviewMP (at the moment only tiff 8 and 16nits integer as input)
if you want complex and very powerful go imagemagik

Did you solve your problem?

Yeah problem solved!