0

In CImage::Save() function, how can I change the file name?

I saw MSDN(https://msdn.microsoft.com/en-us/library/d06f3fhw(v=vs.120).aspx), but I cannot understand.

Also, every example I found used a constant file name. Like below

CImage.A;
A.Save("test.bmp");

I want to save multiple bmp files. (test1, test2, test3.... test'n'...) In other words, how can I do formatting in the first argument of the function???

Chanwoo Ahn
  • 334
  • 2
  • 13
  • Unclear: `A.Save("test.bmp")` saves a `CImage` into a named file. As you only have one `CImage` in your question, why do you want to save it to multiple files? – Richard Critten Feb 02 '18 at 13:13
  • Because, I'll use CImage::Save function in while (1). The CImage will gonna change every time. I don't want the function to overwrite again and again. @RichardCritten – Chanwoo Ahn Feb 02 '18 at 14:07
  • Then just use a counter, append it to the root filename and then add-on the extension. `std::stringstream` can be used for this. – Richard Critten Feb 02 '18 at 14:26

0 Answers0