ylliX - Online Advertising Network
Apple Frames 3.3 supports all the new devices released by Apple in 2024.

Apple Frames 3.3 Adds Support for iPhone 16 and 16 Pro, M4 iPad Pro, and Apple Watch Series 10 (feat. An Unexpected Technical Detour)


Well, this certainly took longer than expected.

Today, I’m happy to finally release version 3.3 of Apple Frames, my shortcut to put screenshots inside physical frames of Apple devices. In this new version, which is a free update for everyone, you’ll find support for all the new devices Apple released in 2024:

  • 11” and 13” M4 iPad Pro
  • iPhone 16 and iPhone 16 Pro lineup
  • 42mm and 46mm Apple Watch Series 10

To get started with Apple Frames, simply head to the end of this post (or search for Apple Frames in the MacStories Shortcuts Archive), download the updated shortcut, and replace any older version you may have installed with it. The first time you run the shortcut, you’ll be asked to redownload the file assets necessary for Apple Frames, which is a one-time operation. Once that’s done, you can resume framing your screenshots like you’ve always done, either using the native Apple Frames menu or the advanced API that I introduced last year.

So what took this update so long? Well, if you want to know the backstory, keep on reading.

A Tale of Two Types of Screenshots

I was busy with my Not an iPad Pro Review story back in May when the new iPads came out, then WWDC happened, so I didn’t get to work on an updated version of Apple Frames with support for the M4 iPad Pros until after the conference had wrapped up. I quickly put together a version with support for the new iPad frames and tried the shortcut with a screenshot, and it didn’t work. Not in the sense that the shortcut was crashing, though; instead, when the screenshot was overlaid on top of the iPad frame, the alpha transparency around the iPad would turn into a solid black color.

I thought that was weird, but initially, I just wrote it off as an early iPadOS 18 beta issue. I figured it’d get fixed in the near future during the beta cycle.

I started getting concerned when months passed and not only was the issue never fixed, but MacStories readers kept asking me for updates to the shortcut. To make matters worse, I got to the point where I was seeing the problem with some screenshots but not with others. The worst kind of bug is one you cannot reliably reproduce. I tried again. I asked Silvia to put together different versions of the frame assets and even tested different techniques for overlaying images; nothing was working. For some screenshots, the Shortcuts app would turn the transparency around a frame into a black color, and I didn’t know how to explain it.

The situation got even worse when new iPhones and Apple Watches were released, and I still couldn’t figure out how to make Apple Frames work with them. This is when I tried to submit feedback and reached out to folks who work on Shortcuts privately, passing along what I was seeing. That also didn’t work.

I was ready to give up on Apple Frames, but I decided to at least try to post about my issues publicly first, which I did on Bluesky.

So the reason I’ve been unable to update my Apple Frames shortcut for the latest devices is a bug in iOS/iPadOS 18’s Shortcuts app that hasn’t been fixed yet.

For the past few months, the Overlay Image action has always removed the alpha transparency of a PNG.

I have no idea how to work around it.

[image or embed]

— Federico Viticci (@viticci.macstories.net) Nov 19, 2024 at 1:17 PM

It worked. Within 24 hours, MacStories readers Douglas and Antonio got in touch with me with details about the potential culprit, which they independently identified: iOS 18 was capturing some screenshots in 16-bit Display P3 instead of 8-bit sRGB.

As soon as I read Douglas’ email and later read Antonio’s post, I had one of those “of course, I should have thought about this” moments. Why would a PNG with alpha transparency lose its transparency after an image is overlaid on it? Because maybe there’s a metadata mismatch between the two images, and one is being “forced” behind the scenes to be converted to a format that loses the alpha transparency.

Here are the details of the issue: occasionally – seemingly with no clear pattern – iOS and iPadOS 18 capture screenshots in 16-bit Display P3, which means they support a wide color gamut and higher dynamic range. Sometimes, however, screenshots are still captured in the old format, 8-bit sRGB. There is no way to tell these different types of screenshots apart since the Photos app lumps them all together as PNG files in the same Screenshots collection. To confirm my theory, I had to use the excellent Metapho app to inspect the metadata of my screenshots. As you can see below, some of them are captured in 16-bit Display P3, while others are in good old 8-bit sRGB.

I’m a bit mystified by this approach, and I would love to know how and why the system decides to capture screenshots in one format over the other. Regardless, that explained why I couldn’t reproduce the bug consistently or figure out what the underlying issue was: the frame assets (which are based on Apple’s official files) were 8-bit sRGB PNGs; when the shortcut tried to overlay a similar screenshot, everything worked, but if the screenshot was one of the new “fancy” images with a 16-bit Display P3 profile, I’d get the black border around the image.

Apple has never publicly documented this, nor is there any information in Shortcuts that explains how the Overlay Image and Mask Image actions work with conflicting color profiles in images. But I still had to come up with a solution now that I knew what the problem was.

Initially, Antonio Bueno proposed a workaround that used JavaScript to redraw every screenshot passed to the shortcut with a different RGB profile. That happened locally, on-device, thanks to Shortcuts’ ability to execute arbitrary JS code in a URL action. It worked, but it added a lot of latency to the shortcut due to increased memory consumption. The performance of the JavaScript-based approach was so bad, the beta version of Apple Frames crashed if I tried to frame more than three screenshots at once. I couldn’t use it for the final version.

I then realized I was thinking about the issue the wrong way. I was convinced I had to fix the screenshots; what if, instead, I simply updated all the frame assets to be 16-bit?

My theory was that, with a 16-bit PNG frame, pasting either an 8-bit or 16-bit screenshot on top of it would cause no trouble. I tested this by asking Silvia to re-export a single frame in 16-bit and, surely enough, it worked. But that led to another problem: should I ask Silvia to manually re-export 68 more frame assets, some of which were older Apple devices that are still supported by Apple Frames but no longer available as PSDs on Apple’s website?

And that, friends, is where One True John comes in. As he will detail later this week in MacStories Weekly for Club members, John found a way to upscale 8-bit PNGs to 16-bit files with no color degradation or bloated file sizes in an automated fashion. Stay tuned for the story on Saturday.

To wrap up, what you should know is this: Apple Frames is now fully compatible with 8-bit and 16-bit screenshots, and all frame assets downloaded and used by the shortcut are 16-bit PNGs. As a result, Apple Frames is just as efficient as ever; in fact, thanks to some improved logic for overlaying screenshots, it should even be slightly faster than before.

Like I said, I wish I’d thought of this sooner instead of having to wait months for a bug fix that, at this point, will likely never come. But such is the journey with automation sometimes. I’m glad we eventually figured this out.

Download Apple Frames 3.3

Well, that was a lot of words about color profiles in screenshots. I apologize, but it feels good to finally wrap up this saga.

As I mentioned above, you can download Apple Frames 3.3, completely ignore its backstory, and keep using the shortcut like you’ve always done. I’m thrilled to have an up-to-date version of Apple Frames again, and I hope you like it as much as I do.

You can download Apple Frames 3.3 below and find it in the MacStories Shortcuts Archive.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *