ExactPic: A Shortcut for Precise Image Outputs on iOS

ExactPic Shortcuts Icon

There are plenty of tools to edit photos on iOS or iPadOS but surprisingly few to help you edit them to exact pixel dimensions. This is a particular source of pain for me because I do a ton of work on my iPad, which is otherwise my favorite productivity platform. To fix this, I created a tool called ExactPic; it’s actually a suite of Shortcuts that work together seamlessly on your iPad and your iPhone. You can download it here, free.

I made ExactPic because I regularly find myself needing to output images with precision for this blog, or needing to resize or crop images for smaller downloads, or needing to add a frame or a letterbox to a photo. I’ll also occasionally need to size a profile or background picture to specific requirements for upload to various sites or services. On an iPad it’s also harder than it should be to save a JPG as a PNG or vice versa, or to increase or decrease the compression of a JPG. And performing multiple combinations of any of these edits on an iPad or iPhone usually requires several steps and saving out various versions of a single image. That’s just a lot of friction for anyone who works with images regularly.

Over the past few years I’ve created specific shortcuts to solve various of these editing challenges. I made one to resample an image, another one to add a frame or letterbox to an image; I even made one to rename an image in a specific format and upload it to WordPress for me. They all did their job but in isolation of one another, with none of them able to pick up seamlessly from where another left off. ExactPic fixes all that by bringing them all together into a single, comprehensive suite that, within the capable but fairly bare bones constraints of Apple’s amazing Shortcuts platform, unites them into a single cohesive experience.

The principal shortcut is called simply ExactPic. When you run it from the Photos app or your Files app or anywhere you can work with image files, it will quickly present a simple info window like the one below. Then it presents four options for editing that picture, each one launching a separate shortcut:

  • Resize the image
  • Crop the image
  • Frame the image
  • Save the image

When you run each one for the first time, you’ll be prompted to download that shortcut to your device. (If you have iCloud syncing turned on for your Shortcuts app, downloading these on your iPhone makes them available on your iPad too, and vice versa.)

Once they’re all installed, you can run multiple of these shortcuts on your image in just about any order (though the last one, “Save the image,” exits the suite when you’re done). This makes it possible to perform several sequential operations to get exactly the image file you want in basically one session.

Cropping an Image with ExactPic

How might you use this? Let’s say you take a picture on your iPhone, which produces fairly high resolution images in HEIC format. From your Photos app, you could use ExactPic to resize or resample that image so that it’s lighter weight; then crop the image to a specific dimension and preview that crop so you can be sure you’re isolating the area that you want (see image above); then add a black, white, gray, red or even transparent frame or a letterbox to the image: then compress it as a JPG to make it as small a download as possible; and finally name it and save it back to Photos, out to Dropbox or iCloud Drive, or even upload it directly to WordPress. All in one go. Here’s a video that demonstrates this in action.

I readily admit that a good deal of the motivation behind creating ExactPic was just the fun of nerding out with Shortcuts for a while. ExactPic is in fact easily the most ambitious shortcut I’ve ever created. To make it work, I had to learn how to read and write dictionaries, pass multiple variables from one shortcut to another, create an ersatz while loop and various other programming techniques that are usually way over my head but are made incredibly approachable by the Shortcuts framework. Though it’s lacking in some usability affordances for both makers and users of shortcuts, I’m endlessly impressed by the power and elegance of what Shortcuts can do today. It’s easily one of iOS’s crown jewels (if hidden in plain sight), and its potential to grow in capability and scope is awesome.

Technical Notes

Again, you can download ExactPic for free here. If you’ve never downloaded a third-party shortcut before, you might want to read this article about so-called “untrusted shortcuts” first. It explains how to work with some simple guardrails that Apples puts around Shortcuts for novice users.

To make installing ExactPic as easy as possible, the suite automatically downloads some assets (very small PNG files to serve as image shims) from a GitHub repo to your device, so you’ll need to give it permission to access iCloud Drive. ExactPic also reads and writes to a JSON file that is automatically created and stored on iCloud Drive. As you run each of the shortcuts for the first time, you’ll also be asked for various permissions to access certain websites, run other shortcuts, save to Dropbox etc.

Another caveat: working with large pictures, especially when performing multiple operations on them, can push up against the memory limitations of Shortcuts. I’ve found it reliable on my iPad Pro, but on my three-year old iPhone X, resizing then cropping then framing a large image can cause the shortcut to quit unexpectedly.

Finally, ExactPic was built on iOS 13 but I’ve been able to test it on public beta releases of iOS 14 too, and it seems to work fine. Of course if you run into any issues there or in any other aspect, or if you have any thoughts on using ExactPic, please let me know.

+