Goal is to build a small application which decodes a buffer with raw data and converts it using LodePNG, which has to be built and extended prior, to valid PNG image.
LodePNG: http://lodev.org/lodepng/
GitHub: https://github.com/lvandeve/lodepng
Raw data (4096x3072, 12bit): http://files.apertus.org/AXIOM-Beta/snapshots/portraits/portrait-gainx2-offset2047-20ms-02.raw12
- Create simple C/C++ console application
- Add LodePNG library to it
- Load data from RAW12 file to a buffer
- Add routines to convert from 12bit to 16bit data and convert the data
- Convert 16bit data to 8bit??? Maybe 16bit output would be also fine, still creating a test to verify our approach
- Output valid PNG file with right image
- Bonus task (**not required to qualify**): Add simple linear de-Bayering
**Useful links:**
- RAW12: https://wiki.apertus.org/index.php/RAW12
- 12bit conversion: https://stackoverflow.com/questions/33768206/convert-2-bytes-into-12-bit-number
- 12bit conversion (SIMD not required): https://stackoverflow.com/questions/15443868/fastest-way-to-convert-12bit-image-to-16bit-image
- Simple de-Bayering: https://pdfs.semanticscholar.org/6798/3c25e967361979873cdb05a8056cff1808a4.pdf