bitbank2 / PNGenc

An embedded-friendly PNG encoder
Apache License 2.0
39 stars 8 forks source link

Column by column generation #15

Closed wired8 closed 11 months ago

wired8 commented 11 months ago

Hi @bitbank2, first off great library. I'm attempting to generate an audio waveform image of a large wav file on an esp32. I'm wondering if it's possible to add a method for drawing a png by column rather than by line?

bitbank2 commented 11 months ago

I'm glad you like it. PNGs are encoded one line at a time. If you want to treat them as columns then the only idea I can think of is to rotate your images 90 degrees and then draw each line as if it's a column. There's no other reasonable way I can think of unless you decode the entire image and manage the columns aftwards.