I'm looking for a way to add a 3 pixel black border to every file in a folder. File type is .jpg.

My OS's are Ubuntu 14.04, Ubuntu 15.10, and Windows 7.



  • works on Windows and several other OS, but I could not find a DEB file for Ubuntu
  • is free, even for commercial use
  • can add all kinds of borders
  • supports many formats and can convert between them if needed

It's a command line utility which is very suitable for batch processing of many files without user interaction.


IrfanView works well for me for sets of images. Here are some how-to notes

Here is my stored procedure for border insertion - Infran Procedure to add a border

  1. Right-Click image, 'Open with'->'InfranView'
  2. Press 'b'
  3. Check 'Use advanced options' in upper left, press 'Advanced'
  4. Check 'Canvas Size', press 'Settings'
  5. Enter each border width(Left side, Right side, Top side, Bottom side)
  6. Press 'OK'
  7. Select 'Overwrite existing files'
  8. Press 'OK'
  9. Enter the output directory 'Output directory for result files:'
  10. Navigate to and double click the image to add border to in upper list. This adds it to the 'input files:' listing at bottom list
  11. Press 'Start Batch'

gnuThumbnailer supports Windows and Linux. It is primarily for creating thumbnails of images but has an option for adding borders to images. This option would probably only work if your images are the same size.


You can use gimp on batch mode over all files in folder and run gimp scripts for visual effects like this one for borders.

  • Would you mind posting an example command that would achieve this? That would make it a better quality answer. Thanks! – Nicolas Raoul Aug 30 '16 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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