Hello everyone, I've a project where I have to compress an image. Everything is ok except the displaying of the image (after decompression).
To have my pixelArray, I made:
struct Pixel
{
uint8_t B, G, R;
};
Pixel** pixelArray = new Pixel*[bmpHeader.ImageWidth];
for (int i = 0; i < bmpHeader.ImageWidth; ++i)
pixelArray[i] = new Pixel[bmpHeader.ImageHeight];
Do not care about what is bmpHeader, that just give the size of the image.
Now I would like to display it with SFML, I think texture.update() would work fine but I don't know how to convert Pixel** to sf::Uint8*, and are we oblige to use rbga ? (because I don't use transparency)
Can you please tell me how sf::Uint8* works ? Or even better, can you guide me to convert Pixel** to sf::Uint8* ?
Thanks a lot !