I tried to clone a bmp image into another bmp image but the final image would not open.
#include #include #include
BMP images need padding so each line is a multiple of 4 bytes.
Your lines are not a multiple of 4, so you're missing 2 bytes per line, or 162 in total - which is the difference in size.