We have Bitmap image saving function void Save( const std::string & path, const penguinV::Image & image, uint32_t startX, uint32_t startY, uint32_t width, uint32_t height ) which locates in src/file/bmp_image.h and src/file/bmp_image.cpp files.
During file saving we purposely copy a line of image to temporary array and then write the array into file. The reason behind this is that Bitmap image must have number of bytes to be as a multiplier of 4. For example, if image is 10 bytes/pixel it means that we need to write an additional 2 pixels of value 0.
We want to avoid extra copying to temporary array and directly write data from Image object and add needed amount of bytes into the file.
We have Bitmap image saving function
void Save( const std::string & path, const penguinV::Image & image, uint32_t startX, uint32_t startY, uint32_t width, uint32_t height )
which locates in src/file/bmp_image.h and src/file/bmp_image.cpp files.During file saving we purposely copy a line of image to temporary array and then write the array into file. The reason behind this is that Bitmap image must have number of bytes to be as a multiplier of 4. For example, if image is 10 bytes/pixel it means that we need to write an additional 2 pixels of value 0.
We want to avoid extra copying to temporary array and directly write data from Image object and add needed amount of bytes into the file.