Nowadays most lowlevel functionality like reading or writing graphics are taken care of 3rd party libraries
and that’s ok. It’s way to complicated to do things right and you probably want to focus on outputting or
sending a PNG instead of construction one from scratch. While reading and writing these kind of binary data
was normally done in languages like C or even assembler, most higher level languages still have these
capabilities and yes, even PHP… Meet pack()
and unpack()
.