Export photos with a border from Lightroom Classic
This is how I add a nice thick black border to my photos after I export them from Lightroom Classic using free software.
This is for macOS, but since the same software exists on Windows, you can do something similar there, but I haven’t used that platform in years, so YMMV.
I’m going to presume you’re familiar with export presets in Lightroom Classic. You’re going to use one of them to run a small script that does the magick.
Take a deep breath. You’re going to learn a lot in the next couple of steps. Persist, and it will be worth it.
Installing ImageMagick
To add the border you need to install ImageMagick using brew. Think of ImageMagick as a Swiss Army knife for images. While Lightroom excels at organizing and editing individual photos, ImageMagick can automatically resize hundreds of images, create contact sheets, add watermarks, or convert file formats. You can do all this without you having to click through each image individually.
Step 1: Open Terminal (It’s Not as Scary as It Sounds!)
Terminal is like a text-based way to talk to your Mac. Instead of clicking buttons, you type commands. Here’s how to find it:
Command + Space
to open Spotlight searchDon’t panic if it looks intimidating! Think of it like switching from Auto mode to Manual on your camera. It gives you more control once you know what you’re doing.
Step 2: Install Homebrew (Your New Best Friend)
Homebrew is like an App Store for command-line tools. It makes installing software like ImageMagick incredibly easy. Here’s how to install it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Step 3: Install ImageMagick
Now that you have Homebrew installed, installing ImageMagick is incredibly simple:
brew install imagemagick
YourName@YourMac ~ %
or similar).Step 4: Test Your Installation
Let’s make sure everything worked:
magick -version
Apart from adding borders to images, ImageMagick can also resize images, convert RAW files to Jpeg, add watermarks and more.
Your first ImageMagick script
Open TextEdit or your favourite text editor to create your black borders script. If you use TextEdit, you need to adjust the settings as follows.
Go to TextEdit → Preferences and under “New Document”
Copy this code into your editor before saving it in your Documents folder as add_black_borders.sh
#!/bin/bash# Add black borders to export imagestoday=$(date +%F)open ~/Pictures/for file in "$@"do echo "Working on $file" > ~/export.log /opt/homebrew/bin/magick "$file" -bordercolor black -border 15 /tmp/out.jpg >> ~/export.log 2>> ~/err.log mv /tmp/out.jpg "$file" rm "$file"_originaldone
Your computer can’t run the script without making it executable, so use this command to do that:
chmod +x ~/Documents/add_black_borders.sh
Add it to Lightroom Classic
Lightroom Classic has an “after export” setting in the export dialog you can use to modify the photo(s) you just exported. You’re going to write a small computer programme called a “shell script” that uses ImageMagick to add the border.
Right click on an image, go to Export
and click on Export....
. Select your export preset and scroll to the bottom, to “Post-Processing. It will look something like this. Click on the “After Export” setting and then on “Go to Export Actions Folder Now”.
A new Finder window will open there. It should be Library/Application Support/Adobe/Lightroom/Export Actions/
in your home directory.
Copy the script from your Documents folder to the Export Actions folder by dragging it from one folder to the other.
Export with Borders
Go to your desired export action in the Export...
menu in Lightroom Classic. Scroll to the end, and the After Export
setting will have your add_black_borders
script.
Select that, and remember to update the settings for your export preset.
Export an image, and it should have a black border. The Pictures folder will pop up too, but you can change that in the script in the line that says open ~/Pictures/
. Change that to wherever you put your exported images.
Customize the output
You can change the border width and colour in the script. Look at the magick
line.
-bordercolor black
can be changed to whatever colour you want from this list.Search online, and you’ll find other commands to further change how the border looks.
Bonus: split panoramas
Here’s a bonus script. Save it as panorama.sh in the Export Actions
folder. Add it to an export action you use for horizontal panoramas. Vertical panoramas can be split using 100%x33.33%
instead.
#!/bin/bashopen ~/Pictures/for file in "$@"; do base=$(basename "$file" .jpg) out=$(dirname "$file") /opt/homebrew/bin/magick "$file" -crop 33.33%x100% "${out}/${base}_split_%d.jpg"done
Gobbledygook?
I hope that made some sense, and it works for you. It is unfortunately technical, but take things slowly and carefully, and you’ll have beautiful borders on your exported photos!
Apertureƒ/8CameraILCE-7RM5Focal length172mmISO100Shutter speed5sOk, any #video folks out there who know how to do what I want to do? I don't know what words to search for because I don't know what this technique is called. Boosts welcome, suggestions welcome.
I have a pool cleaning robot. Like a roomba, but for the bottom of the pool. We call it poomba. Anyways, I want to shoot an MP4 video with a stationary camera (a GoPro) looking down on the pool while the robot does its work. So I will have this overhead video of like 3-4 hours.
I want to kinda overlay all the frames of the video into a single picture. So the areas where the robot drove will be dark streaks (the robot is black and purple). And any area the robot didn't cover would show the white pool bottom. Areas the robot went over a lot would be darker. Areas it went rarely would be lighter.
I'm just super curious how much coverage I actually get. This thing isn't a roomba. It has no map and it definitely doesn't have an internet connection at the bottom of the pool. (Finally! A place they can't get AI, yet!) It's just using lidar, motion sensors, attitude sensors and some kind of randomizing algorithm.
I think of it like taking every frame of the video and compositing it down with like 0.001 transparency. By the end of the video the things that never changed (the pool itself) would be full brightness and clear. While the robot's paths would be faint, except where it repeated a lot, which would be darker.
I could probably rip it into individual frames using #ffmpeg and then do this compositing with #ImageMagick or something (I'm doing this on #Linux). But 24fps x 3600 seconds/hour x 3 hours == about 260K frames. My laptop will take ages to brute force this. Any more clever ways to do it?
If I knew what this technique/process was called, I'd search for it.
Quant aux choix des dons, chaque salarié⋅e du 24ème a disposé de 14 tranches de 24€ à répartir aux projets libres de son choix. Ensuite, nous les avons mis en commun pour se répartir les paiements redondant. Une méthode bien efficace : en moins d'une demi journée, nous avons pu choisir et aider 30 projets.
Voici la liste des dons : https://github.com/24eme/banque/blob/master/data/dons.csv
(2/2)
ImageMagick rapidly soaked up all of my free RAM and the OS killed my console in self-defence. Maybe 84000 x 51500 is too much image for us mere mortals.
I like it when my glitch art experiments result in something useful happening in regular software https://github.com/ImageMagick/ImageMagick/discussions/8161#discussioncomment-13428106 #imagemagick
cPanel Shared Hosting Server Specs This article provides an in-depth analysis of our #cPanel Shared Hosting server specs and features powering the 100%-SSD cPanel Hosting services.
cPanel Shared Hosting Server Specs ...
Continued https://blog.radwebhosting.com/cpanel-shared-hosting-server-specs/?utm_source=mastodon&utm_medium=social&utm_campaign=mastodon.social #cardav #multiphp #mailman #cloudlinux #imagemagick #cagefs #csf #python #gitversioncontrol #caldav #imunify360 #nodejs #malwareremoval #phpmyadmin #pgadmin #modsecurity #imap #memcached #cloudsitebuilder #lscache #pop3 #malwarescanner
cPanel Shared Hosting Server Specs This article provides an in-depth analysis of our #cPanel Shared Hosting server specs and features powering the 100%-SSD cPanel Hosting services.
GET SECURE CPANEL HOSTING AT 50% OFF ...
Continued https://blog.radwebhosting.com/cpanel-shared-hosting-server-specs/?utm_source=mastodon&utm_medium=social&utm_campaign=mastodon.social #malwarescanner #cloudsitebuilder #cagefs #mailman #python #caldav #phpmyadmin #cardav #lscache #nodejs #imagemagick #multiphp #modsecurity #pgadmin #pop3 #malwareremoval #imunify360 #csf #cloudlinux #gitversioncontrol #memcached #imap
@debby It really comes down to hardware now-a-days. Software like #Kdenlive #Krita #Flowblade #Shotcut #GMIC #Inkscape #Pencil2D #GIMP #Friction #Synfig #Glaxnimate #OBS #Blender #Handbrake #FFmpeg #Imagemagick and #Natron tend to offer some impressive options that allow users to achieve some impressive results.
cPanel Shared Hosting Server Specs This article provides an in-depth analysis of our #cPanel Shared Hosting server specs and features powering the 100%-SSD cPanel Hosting services.
GET SECURE CPANEL HOSTING AT 50% OFF ...
Continued https://blog.radwebhosting.com/cpanel-shared-hosting-server-specs/?utm_source=mastodon&utm_medium=social&utm_campaign=ReviveOldPost #memcached #malwarescanner #modsecurity #malwareremoval #lscache #python #imap #caldav #nodejs #pop3 #cardav #cloudsitebuilder #csf #mailman #pgadmin #phpmyadmin #imagemagick #cloudlinux #gitversioncontrol #imunify360 #multiphp #cagefs
cPanel Shared Hosting Server Specs This article provides an in-depth analysis of our #cPanel Shared Hosting server specs and features powering the 100%-SSD cPanel Hosting services.
GET SECURE CPANEL HOSTING AT 50% OFF ...
Continued https://blog.radwebhosting.com/cpanel-shared-hosting-server-specs/?utm_source=mastodon&utm_medium=social&utm_campaign=ReviveOldPost #imunify360 #cloudlinux #csf #memcached #pop3 #modsecurity #malwareremoval #mailman #cagefs #cloudsitebuilder #cardav #python #caldav #malwarescanner #gitversioncontrol #imap #phpmyadmin #lscache #nodejs #pgadmin #multiphp #imagemagick
Restoring a vector image without AI
Here I document an afternoon of toying with ImageMagick and using the properties of GIF in an attempt to cheat myself into a crisp raster image as if it were rendered freshly from a vector graphic.
https://www.sindastra.de/p/3581/restoring-a-vector-image-without-ai
Wanna make a tiny planet from an image with imagemagick? That's easy:
`magick IN.png -distort arc 360 OUT.png`
Wanna blend the 2 sides together? That's MUCH harder........
`in="IN.png"; w="$(magick identify -format '%w' "${in}")"; h="$(magick identify -format '%h' "${in}")"; magick "${in}" -gravity east -crop "$((w/20))x${h}+0+0" \( -size "${h}x$((w/20))" gradient:white-transparent -rotate 90 \) -alpha set -compose xor -composite \( "${in}" -gravity west -crop "$((w/20))x${h}+0+0" \) -compose dst-over -composite \( "${in}" -gravity center -crop 90%x100%+0+0 \) +append -strip tmp.png; magick tmp.png -distort arc 360 OUT.png; rm tmp.png;`
(WARNING: uses `tmp.png` as a temp image)
Still want to try and get rid of the dark banding around the blend but it's at least better than a seam line.
Imagemagick didn't like `-distort` after `+append` for some reason...... I think it's some kinda global image offset that `-strip` only fixes during saving?
@razze Can #Gwenview display them? I think so?
Also have you tried #imagemagick or #graphicsmagick? There might even be a #KDE Context menu entry to batch convert them.
Gwenview can even display Sony RAW images.