Hi, i'm trying to construct a Cimg image from a std::vector filled by a lodepng decoded buffer in C++.
....
std::vector imag;
std::vector vectorBuffer(chunk.myBuffer, chunk.myBuffer + chunk.size); //my CURL buffer with PNG compressed image
unsigned error = lodepng::decode(imag, width, height, vectorBuffer);
.....
so imag contains decoded PNG image, 4 bytes per pixel, ordered RGBARGBA and i'm trying to understand how to create a CImg image.
With Jpeg o can use jpeg_buffer plugin to create a Cimg image from a Jpeg compressed buffer, but i don't know how to do it with PNG.
Hi, i'm trying to construct a Cimg image from a std::vector filled by a lodepng decoded buffer in C++.
....
std::vector imag;
std::vector vectorBuffer(chunk.myBuffer, chunk.myBuffer + chunk.size); //my CURL buffer with PNG compressed image
unsigned error = lodepng::decode(imag, width, height, vectorBuffer);
.....
so imag contains decoded PNG image, 4 bytes per pixel, ordered RGBARGBA and i'm trying to understand how to create a CImg image.
With Jpeg o can use jpeg_buffer plugin to create a Cimg image from a Jpeg compressed buffer, but i don't know how to do it with PNG.
Thank you for any suggestion Emanuele