HI.
I'm new to this forum and new to C++ programming so be kind !!
I've got a program that reads in a batch load of tif files works on them one at a time and then outputs the files as .png. Problem l have is that the tif filenames are basically filename.0001.tif - this is read in and saved to disk as a png file. But the filename changes to filename.0001.tif.png . How can l get rid of the .tif section and replace with .png.
The code uses argv[1] to hold the loaded filename - in this case filename.0001.tif. I am then doing ;-
std::string op=argv[1];
op+=".png";
write_png(op.c_str(), dst);
I'm basically adding the .png extension to the end of the original filename to use for saving out. I need to get rid of the .tif bit and replace with the .png bit.
Does anyone know how l can remove the .tif bit ???
Steviebax.