# PNG file save (SOLVED)

**URL:** <https://forum.defold.com/t/png-file-save-solved/12005>\
**Category:** Questions\
**Created:** [September 29, 2017, 6:45am UTC](https://forum.defold.com/t/png-file-save-solved/12005 "2017-09-29T06:45:26Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![HG17](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/hg17/32/4757_2.png) [@HG17](https://forum.defold.com/u/HG17)\
**Post date:** [October 2, 2017, 7:35am UTC](https://forum.defold.com/t/png-file-save-solved/12005/3 "2017-10-02T07:35:11Z")

</div>

Sorry for the late reply. 😅

> [@Defold PNG - Inspect, load and save PNG files](https://forum.defold.com/t/defold-png-inspect-load-and-save-png-files/8832):
>
> Not really sure how useful this is but I thought I’d share it anyway. [Defold PNG](https://github.com/britzl/defold-png) is a Defold native extension that allows you to inspect, load and save PNG files. Usage: -- load my.png from disk local f = io.open("my.png", "rb") local bytes = f:read("\*a") -- read the PNG header local info = png.info(bytes) print(info.width) print(info.height) print(info.colortype) -- png.RGB, png.RGBA, png.GREY, png.GREY\_ALPHA or png.PALETTE print(info.bitdepth) -- decode the PNG to a Defold buffer in RGB(A) …

I have read and completely solved this. Thanks britzl!! 😁

---

_[View the full topic](https://forum.defold.com/t/png-file-save-solved/12005)._
