I tried to clone a bmp image into another bmp image but the final image would not open.
#include #include #include
BMP stores each row in a multiple of 4 bytes. In your case, that means that each rows takes 116 bytes, (2 bytes padding). That gives 116x78x3+54=27198 So you are doing it wrong.
BTW the header length not always is 54 bytes.