The problem I encounter is that my mosaic won't be at the good size (that is (originalWidth * 2, originalHeight * 4) ) after the use of gflMerge.
Here is my code:
Code: Select all
GFL_BITMAP* CImageBMP::mergeImages(const GFL_BITMAP *images[], const int nb_images = 8)
{
GFL_BITMAP* final_image = new GFL_BITMAP;
int width = images[0]->Width,
height = images[0]->Height;
//Just 8 images for the moment.
final_image->Width = width * 2;
final_image->Height = height * 4;
GFL_POINT origin[] = {
{width * 0, height * 0}, {width * 1, height * 0},
{width * 0, height * 1}, {width * 1, height * 1},
{width * 0, height * 2}, {width * 1, height * 2},
{width * 0, height * 3}, {width * 1, height * 3}
};
GFL_UINT32 opacity[] = {255, 255, 255, 255, 255, 255, 255, 255};
gflMerge(images, origin, opacity, nb_images, &final_image);
return final_image;
}
Should I resize the source pictures to the final size and then merge them altogether, or am I misusing the function?
Thanks.