I cut the picture in a loop and save it in this way.

mapimage.save("test.bmp","BMP"); 

But that's the problem. I expected it to be saved approximately like this: test.bmp test1.bmp test2.bmp test3.bmp test4.bmp And the program simply overwrites the same file. How to be?

  • one
    Of course, it overwrites the same file. After all, as the name is always used "test.bmp". Why would the program suddenly use other names? - Enikeyschik Nov.

1 answer 1

Create a loop

 for (int i = 1; i <= <number_of_parts>; ++i) { mapimage.save(QString("test%1.bmp").arg(i),"BMP"); } 

where number_of_parts is the number of parts of your slicing