I need to convert a raw, rgb32-formatted image to a PNG with a library (written in, in order of preference, Java, C, C++) having a permissive (e.g. BSD or Apache) license.
I'm able to convert the image using FFmpeg with this call:
ffmpeg.exe -vframes 1 -vcodec rawvideo -f rawvideo -pix_fmt rgb32 -s 20x40 -i infile -f image2 -vcodec png out.png
where 20x40 is the width by the height.
But, sadly, I need to avoid FFmpeg due to its license.
I've seen people speculate that libpng could do the job, but I'm skeptical given the documentation I've seen at the libpng site. Perhaps you'll give an example.
I don't know what the rawvideo and rgb32 values mean to FFmpeg, so I asked this question.
EDIT 1: edited the ffmpeg call to show width x height.