Skip to content
Dave Klein
Writing

Introducing DKBezeler

Every framed iPhone capture on this site takes the same path: I drop a screenshot or a screen recording into a folder and it comes out baked into a device bezel. I never open an image editor. I never line up a frame. The Dot review has dozens of these and I made exactly none of them by hand.

Two of them, exactly as the pipeline produced them. DKBezeler draws the phone around the baked screenshot from Apple’s schematics and flattens the result to one PNG, transparent outside the phone.

And a baked screen recording. Toggle this site’s theme and watch the corners follow, because what you are seeing is a light version and a dark version swapped with CSS.

That pipeline is now DKBezeler, a CLI you can run with npx. It reads your capture’s pixel size, names the phone that took it, and draws that phone’s bezel from Apple’s own dimensional drawings: the corner curve, the cover glass, the bezel width, the Dynamic Island or notch, the buttons, all at the millimetre. Every iPhone since the 12 lives in the package as a few dozen numbers, so no frame art is downloaded or shipped. Screen recordings come out as a light version and a dark version with corners matched to your page backgrounds, and the display component swaps them instantly when your site changes theme with no JavaScript.

My favorite parts are the pixels you will never see. The frame is drawn at whatever scale makes its screen exactly your capture’s pixels, so a screenshot is never resampled on its way into the phone. Around a phone’s rounded corners a naive composite lets the screen bleed through the frame’s antialiased edge: invisible on white, a crusty dotted rim in dark mode. DKBezeler clips the screen to the real corner curve instead, and a baked video gets the same care as a final pass outside the phone’s silhouette. The source is on GitHub and the CLI is on npm. Your screenshots deserve a nicer frame than a rectangle.

Revised September 2026. DKBezeler 0.2 draws its frames from Apple’s dimensional drawings instead of downloading Apple’s bezel art, and the two examples above were re-baked with it. The rest of this post is as it was.

Chat about this?

Send a comment