Skip to content

New Addon: Batch Image Converter

August 25, 2015

I recently had to convert a bunch of 32 bit tif depth maps to 16 bit pngs at work, while keeping the same file names expect for the new extension.

Normally I’d do this in Photoshop, but photoshop doesn’t allow you to save 32 bit tifs as png, it only converts it to HDR, PSD, PSB, RAW, EXR or PBM.

Which program does allow you to do that? Blender. You can load tifs and render them to any of the supported formats in Blender, which includes the 16bit PNGs I wanted.

I loaded the tifs to the video sequence editor and rendered the frames as PNGs. While that worked, all the new files had frame numbers for names.

So I decided to write an addon that does the same thing, only it saves the converted files with the same name as the original, except for the extension of course.

There’s a bunch of features that will make this addon even more useful, which include:

  1. Custom name patterns (instead of keeping the same name, save as another kind of pattern with numbering).
  2. Make sure to ignore non-image files in the source folder for the script.
  3. Read the source images’ resolution, and allow using it for the output, instead of relying solely on the render settings.
  4. Avoid deleting the existing render node tree.
  5. Have any additional ideas? feel free to write a comment to this post and suggest more features.

For a detailed installation and usage guide (which really isn’t all that required for such a simple addon), watch the video above or visit the addon’s WIKI page.

To report bugs, fill this form.

Advertisements
9 Comments
  1. Spirou4D permalink

    Hi Tamir Lousky,

    Congratulations for this so simple idea with Blender! Very nice.
    I have a idea too, is it possible to setup the dimension to 0 (scale 100% off’course) to convert all pictures with the same dimension as original size, may be?

    Have a nice day! Byebye
    Spirou4D

    • Hi Spiru,
      Thanks 🙂
      Yeah I definitely want to add a checkbox where you will just mark “keep original size”, and it will read the resolution from the source file and keep it for the destination file.

      • Spirou4D permalink

        Very nice! Thanks in advance::::::
        Byebye

  2. Spirou4D permalink

    >>>>read the resolution from the source file
    it’s very difficult I mean, because a friend try it for vid format too and use a php script to obtain a result!!!! very difficult to read in hexa picture file…..Good Luck!

    • Since I’m using the image input render node and blender’s image file object, it shouldn’t be a problem, I believe I can read the image dimensions right from the object’s properties.

      • Spirou4D permalink

        Ha yes with nodes…good idea! Bye bye

  3. Sebbo permalink

    Hi, big missing part..
    & you Share this…
    Amazing thx..
    My first feature idea is ..corect the Gamut or color space option…

    Best regard mfG Sebastian R.

Trackbacks & Pingbacks

  1. New addon: batch image converter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: