KDE, Linux, OpenSuse

BIR – Linux GUI Batch Image Resizer

Images from your digital camera tend to be big. Really big. Even with our broadband connections having a slideshow of 5mb images does not make a lot of sense. If you want to email images you probably want to resize them all before you send them. There are also situations where you have images of many different sizes and you want to resize them uniformly. With a quick Google search I couldn’t find any way to do this that didn’t involve a command line. I set out to create a batch image resizer with a GUI similar to the ones I’ve used on Windows.

Its called BIR for Batch Image Resizer. It came out looking like this:

Linux batch image resizer
BIR – The Linux batch image resizer

Along with resizing it will also rotate your images and crop them. It has plenty of options for fine tuning. It can resize a directory recursively and preserve your directory structure in the destination folder. I coded this so it looks at all the images and finds the first parent folder that all of the files share. Alternatively, you can also set it so all of the resized files end up on the same folder with no subdirectories. I’ve tested it with hundreds of files and it seems to work fine no matter how much you throw at it.

It can resize almost any type of file you would need to resize. The list of formates are:

  • BMP Windows Bitmap
  • JPG Joint Photographic Experts Group
  • JPEG Joint Photographic Experts Group
  • PNG Portable Network Graphics
  • PPM Portable Pixmap
  • TIFF Tagged Image File Format
  • XBM X11 Bitmap
  • XPM X11 Pixmap

Thanks to some helpful people on Reddit people have tested it and helped me iron out any issues they discovered

The source code is available here:
https://github.com/agronick/BIR

Here you can find packages for OpenSuse, Fedora, RedHat, and CentOS.

Here you can find the package on the OpenSuse Build Service.

Version 2.0 fixes some issues with Ubuntu and all the code is updated for Qt5. If you need to compile it you use the same exact steps you used for qt4 except the qmake command might be qmake-qt5.

Compiling the Batch Image Resizer
If you rather not deal with resolving dependencies yourself you can download Qt from the Qt website. You can also download Qt-Creator which is the IDE I used to create this program.

If there are no precompiled release for your distro you can compile a release very easy. You just need the dependencies for Qt5. The development package will probably have a suffix like -dev. With a command like this you can search for packages with the letters “qt5” in them that also has the string “-dev”. This works for Ubuntu.

sudo apt-cache search qt5 | grep "dev"

So anyways, once you get the sources and dependencies compiling and installing is very easy.

$ mkdir build
$ cd BIR/build
$ qmake-qt5 ../  
$ make
$ sudo make install

Thats all there is to it. The program should appear in whatever launcher you use.

Advertisements

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