Skip to content

jonnyjackson26/device-frames-media

Repository files navigation

Device Frames Media

The Open Source Standard Library for Device Templates - Website

For each device, there is a:

  • PNG of the device frame
  • PNG of the mask of the frame (grayscale binary screen mask)
  • JSON file with metadata

Example of Frame, Template, and Mask iPhone 17 Pro Max Cosmic Orange Frame, Template, and Mask PNGs

This data is stored within device-frames-output, which has this structure:

device-frames-output/
├── {category}/         
│   └── {model}/
│       └── {variant}/            
│           ├── frame.png         
│           ├── mask.png
│           └── template.json  
├── index.json 

where category is either Apple iPhone, Android Phone, Android Tablet, Apple iPad,
model is the type of device (ex: 17 Pro Max, iPad mini 8.3, Pixel 9 Pro XL), and
variant is the different colors (ex: Cosmic Orange, Blue, Titanium),
and index.json is a JSON file which contains all frames in a nested lookup structure, each variant in kebab-case with hosted URLs and template metadata:

{
  "apple-iphone": {
    "17-pro-max": {
      "cosmic-orange": {
        "frame": "https://jonnyjackson26.github.io/device-frames-media/device-frames-output/Apple%20iPhone/17%20Pro%20Max/Cosmic%20Orange/frame.png",
        "mask": "https://jonnyjackson26.github.io/device-frames-media/device-frames-output/Apple%20iPhone/17%20Pro%20Max/Cosmic%20Orange/mask.png",
        "screen": {
          "x": 100,
          "y": 100,
          "width": 1320,
          "height": 2868
        },
        "frameSize": {
          "width": 1520,
          "height": 3068
        }
      }
    }
  }
}

This data is created from raw PNGs of device frames (device-frames-raw) with the script process_frames.py. Algorithm docs Frame process to seperate Mask and Frame

Contributing

Please add more device frames to expand the dataset. See CONTRIBUTING.md.

  1. Add the frame PNG to the appropriate spot in device-frames-raw
  2. Push your branch (or open a PR) and GitHub Actions will automatically run process_frames.py and regenerate the device list below

List of Devices and Variations

Apple iPhone:

Apple iPad:

Android Phone:

Android Tablet:

About

PNGs of common phone device frames (Apple and Android), as well as masks and templates for fitting images within them.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages