HOWTO: Square Instagram images with white borders

I noticed that a lot of Instagram users, such as Alan Schaller to name but one, were posting images with thick white borders to make their images into the square images that Instagram favours. I like the striking look these images have in the Instagram gallery.

I wondered for some time about the best way of adding this border and from brief searches there are apps that will add the border but my workflow involves Lightroom so I wanted to integrate the border making into my export process.

I work on a Mac, and already have ImageMagick installed so I knew a little shell scripting would probably go a long way.

A couple of searches later, and I found this page describing how to use ImageMagick to create a floating image within a square canvas without changing the aspect ratio of the image.

Instagram resizes to 1080px wide so by using the following code I could make a rectangular image into a square:

convert -background white -gravity center input.jpg \
     -resize 1080x1080 -extent 1080x1080 result.jpg

Here’s an example from my street photo today. See it on Instagram here.

Once I could do that, the rest was simple. I have a Lightroom export for Instagram images that resizes them and places them in a folder where they are synced automatically with my phone using Syncthing.

Export actions have a “post processing” section where Lightroom can call an external script. I created the following script, made it executable with chmod a+x add_instagram_border.sh and added to Lightroom using “Open in Other Application”.

#!/bin/sh

# Square and add white borders to images.
# https://odd.blog/

for i in "$@"
do
    /usr/local/bin/convert -background white -gravity \
        center "$i" -resize 1080x1080 -extent 1080x1080 \
        /tmp/out.jpg
    mv /tmp/out.jpg "$i"
    open "~/Sync/Instagram"
done

The script goes through the exported images from Lightroom, adding borders to them, and then at the end opens the folder in Finder for review.

Hopefully this will be useful to someone else. If you add borders to your images, how do you do it?

PiMIGA: Amiga on the Pi

UPDATE in December 2021! Chris released version 2.0 of PiMIGA. There’s only one version this time and it comes in a huge 23GB 7z file. You can grab a torrent to download PiMIGA 2.0 from his video here:

This version runs on a 64bit version of Linux and feels faster. It does not come with Amiga ROMs so you must provide them. Chris explains where to put the kick31a1200.rom in his video. If you receive an error saying /dev/sda1 is missing on boot up and nothing else happens then you haven’t copied the ROM into the right place!

Here’s a few videos showing off PiMIGA 2.0:

I found another video elsewhere where the author complained of really bad lag but it may have been some weird HDMI issue, or sound buffer lag. The only problem I noticed was that Syndicate ran way too fast. Maybe the JIT had to be disabled?

Make sure you change the sound settings (F12->Sound):

  • Set Frequency to 22050
  • Filter to off.
  • Sound Buffer Size to Min.

Don’t forget to save the configuration.

UPDATE on Feb 15, 2021! Chris Edwards has released version 1.5 of PiMIGA. It now comes in two forms and works (sort of) on the RPI3b as well as RPi4 and 400. The two versions are a 32GB “lite” version and a 128GB “MF” version:

Lite edition, all programs and games, no videos , no mp3, all mods. MF edition, 65,000 + ADFs from the complete Commodore Amiga Tosec archive (de-duped /cleaned / virus scanned ) 128,000 executables in a 13 cd pack of stuff from eab archives of yesteryear. emulations, music, videos all sorts of goodies.

More details are to be found on his release video, including links to the torrent files for both.

UPDATE! Chris Edwards released version 1.4 of PiMIGA for the RPI4 or 400. More info in his release video here.

UPDATE! As of November 23rd 2020 there is now a PiMIGA 1.3 Pi 400 Edition thanks to Chris Edwards. This version has been cleaned up so the happynewyear96 virus has been removed, and it now works out of the box on the Raspberry Pi 400! It works on the Raspberry Pi 4 too of course. Pi3 owners will want to download the original 1.2b version. Here’s a teaser trailer.

PiMIGA 1.3 is available as a torrent, so download it with your favourite torrent client. The password on the archive is still pimiga but I haven’t tested it yet, it’s still downloading. This Reddit thread has more info and a useful comment linking to PiShrink that will reduce the size of the image from 32GB to 20GB. I am very excited about trying this on my Raspberry Pi 400!

The Commodore Amiga was an amazing 16 bit computer of the 80’s and 90’s and is still used today by people who love the system.

WinUAE is the best Amiga emulator for modern systems and it has been ported to many operating systems. FS-UAE is a great port I use on Mac and Amiberry or Amibian use the uae4arm port that runs on Raspberry Pi boards.

To load games and apps on the Amiga you used 3.5 inch discs but if you had a hard disk back then the Amiga supported it. I never did so I put up with the relatively slow loading of the discs.

As I have been spoiled by much faster loading of modern systems, loading games from discs in an emulator soon became a bore. Many games used to (slowly) load an intro with thumping music and an animation, but after hitting fire on my joystick I’d be prompted to “Enter disc 2” for yet more loading.

Enter WHDLoad, a system that patched games so they could be loaded from a hard disk image. It sounds great in theory but over the years I could never get it working the way I wanted. I just wanted to see a nice Workbench desktop UI with an disk image of games to play around in.

I’m not the only one apparently. Through this video on alternative operating systems for the Raspberry PI I found out about PiMIGA. It’s a 32GB disk image you burn to SD card for RPI 3 and 4 and when booted up presents a rather nice Workbench desktop with lots of games and apps. BTW, the password is ViWsC7oU3.

It’s based on Amiberry, and uses WHDLoad of course and everything is set up for you!

I haven’t tested it yet myself. My RPI3 is busy running Plex, Backuppc and Pihole but I want to get an RPI4 to give it a go!

Here’s a word of warning however. The video above shows a virus checker running and it finds a couple of viruses that are removed (in Amiga apps) so I would isolate the Raspberry PI device from the rest of your network if you can. Use the guest network of your router perhaps or just leave the device offline.

An alternative to PiMIGA is AmiKit which appears to do something similar but runs on Windows, Linux and Mac (and RPI4 with some fiddling around) and even lets you launch Windows, Linux or Mac apps from within Workbench. It looks rather nice!

Memento Mori

remember that you die

Memento Mori is a stunning Commodore 64 demo released by Genesis Project that won first place at the Function 2020 demo party recently. The picture above was shared by Raistlin/G*P on Twitter saying:

Razorback delivered this stunning piece for Memento Mori. This is a 408 pixel wide multicolour bitmap that we scrolled, right through the side borders, at 25fps, streaming from disk as we went. A world first on C64 🙂

Raistlin/G*P

Watch it here on Youtube!

James Last plays the Beatles

In the mid 80’s I found a cassette tape of Beatles music played by the James Last orchestra. While I sort of knew some of the music this was the first time I heard many of the songs and I preferred this orchestra version to the original!

The next time the Beatles would intrude on my life would be when I watch Red Storm for the first time in the early nineties.

I guess I have a thing for instrumental Beatles music. 🙂