# How are projects saved into PNG files?

**URL:** <https://forum.makecode.com/t/how-are-projects-saved-into-png-files/40591>\
**Category:** Help\
**Created:** [November 21, 2025, 7:15pm UTC](https://forum.makecode.com/t/how-are-projects-saved-into-png-files/40591 "2025-11-21T19:15:53Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![AtlasTG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/atlastg/32/25690_2.png) [@AtlasTG](https://forum.makecode.com/u/AtlasTG)\
**Post date:** [December 1, 2025, 8:04pm UTC](https://forum.makecode.com/t/how-are-projects-saved-into-png-files/40591/21 "2025-12-01T20:04:36Z")

</div>

I know my next project : )

---

<div class="post-metadata">

**Author:** ![richard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/richard/32/5417_2.png) [@richard](https://forum.makecode.com/u/richard)\
**Post date:** [December 1, 2025, 8:11pm UTC](https://forum.makecode.com/t/how-are-projects-saved-into-png-files/40591/22 "2025-12-01T20:11:28Z")

</div>

we do the same thing in reverse, basically! loop over all of the pixels, convert into the RGB channels, read the bottom 4 bits of each channel and combine them together to reconstruct the project.

i don’t know if this code will be terribly useful to you because it’s pretty hard to read and involves a lot of [bit twiddling](https://en.wikipedia.org/wiki/Bit_manipulation), but the encode and decode code is here for reference:

> <https://github.com/microsoft/pxt/blob/master/pxtlib/util.ts#L1552>

---

<div class="post-metadata">

**Author:** ![babol](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/babol/32/27355_2.png) [@babol](https://forum.makecode.com/u/babol)\
**Post date:** [December 1, 2025, 10:04pm UTC](https://forum.makecode.com/t/how-are-projects-saved-into-png-files/40591/23 "2025-12-01T22:04:43Z")

</div>

thanks, it’s always fun to learn how these systems work!

[Previous page](https://forum.makecode.com/t/how-are-projects-saved-into-png-files/40591.md?page=1)
