Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Reverse-engineering the dynamic wallpaper file format in macOS Mojave.

The dynamic wallpaper in MacOS Mojave is a single 114 MB .heic file that seems to contain 16 embedded images.

It also contains the following binary plist data in its metadata under the key "Solar". It's an array of 16 items, each with four keys:

  • i (integer). This seems to be the image index.
  • o (integer). This is always 1 or 0. Stephen Radford thinks it indicates dark mode (0) vs. light mode (1).
  • a (decimal). I’m pretty sure this is the angle of the sun over the horizon. 0º = sunset/sunrise. 90º = sun directly overhead. Negative values = sun below horizon.
  • z (decimal). This seems to be the cardinal position of the sun relative to the camera. 0º = sun is directly in front of the camera. 90º = sun is directly to the right of the camera. 180º = sun is directly behind the camera.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>si</key>
<array>
<dict>
<key>i</key>
<integer>0</integer>
<key>z</key>
<real>270.9334057827345</real>
<key>a</key>
<real>-0.3427528387535028</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>1</integer>
<key>z</key>
<real>81.77588714480999</real>
<key>a</key>
<real>-10.23975864472505</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>2</integer>
<key>z</key>
<real>86.33545030477751</real>
<key>a</key>
<real>-4.247734408075456</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>3</integer>
<key>z</key>
<real>90.81267037496195</real>
<key>a</key>
<real>1.389086633100843</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>4</integer>
<key>z</key>
<real>95.30740958876589</real>
<key>a</key>
<real>7.167168970526129</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>5</integer>
<key>z</key>
<real>99.92062963268938</real>
<key>a</key>
<real>13.08619419164163</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>6</integer>
<key>z</key>
<real>129.1865220819196</real>
<key>a</key>
<real>40.41563946490428</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>7</integer>
<key>z</key>
<real>182.2330942549791</real>
<key>a</key>
<real>53.43347266172774</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>8</integer>
<key>z</key>
<real>233.5515919580959</real>
<key>a</key>
<real>38.79312820063863</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>9</integer>
<key>z</key>
<real>261.8715904657666</real>
<key>a</key>
<real>11.08942317126588</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>10</integer>
<key>z</key>
<real>266.4432737071051</real>
<key>a</key>
<real>5.184575323673625</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>11</integer>
<key>z</key>
<real>275.4420453669525</real>
<key>a</key>
<real>-6.248309374122789</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>12</integer>
<key>z</key>
<real>280.0703158940117</real>
<key>a</key>
<real>-12.20770735214888</real>
<key>o</key>
<integer>1</integer>
</dict>
<dict>
<key>i</key>
<integer>13</integer>
<key>z</key>
<real>309.4185731874514</real>
<key>a</key>
<real>-39.48933951993012</real>
<key>o</key>
<integer>0</integer>
</dict>
<dict>
<key>i</key>
<integer>14</integer>
<key>z</key>
<real>2.175096553867547</real>
<key>a</key>
<real>-52.75318137879935</real>
<key>o</key>
<integer>0</integer>
</dict>
<dict>
<key>i</key>
<integer>15</integer>
<key>z</key>
<real>53.50908581251309</real>
<key>a</key>
<real>-38.04743388682423</real>
<key>o</key>
<integer>0</integer>
</dict>
</array>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.