Open kevin-gjm opened 7 years ago
@kevin-gjm Your post helps a lot ~ 👍 Thanks very much~
But there is another problem:
In this article, after calling GetDIBits
, I found that bmp[bmpos + 3]
is always 0
, which means the pixel is transparent;
So is it an issue?
@BOT-Man-JL
Yes, I test it in other machines.Some work well but some can not.
So I made it all 255 as a temporary solution. But it lost the transparency information.
image[newpos + 3] = 255;
in file lodepng/examples/example_bmp2png.cpp. Line 93-97 wrong R/G/B/A order
should be : image[newpos + 0] = bmp[bmpos + 2]; image[newpos + 1] = bmp[bmpos + 1]; image[newpos + 2] = bmp[bmpos + 0]; image[newpos + 3] = bmp[bmpos + 3]; when I use this it can work well.