0
I needed to take the path of the executable and save in a folder inside the root directory where the ". exe", serving both the file programming in the "bin" and "debug" folder and when creating the installer with "Inno setup" and opening in any user-designated folder when installing the file. It is taking the name of the file and saving in "bmp" format but it is not working to pick up and save the folder in the directory of the executable see my code below;
string pastaimagem = "imagem";
string appPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath);
Bitmap bmp = new Bitmap(openFileDialog1.FileName);
Bitmap bmp2 = new Bitmap(bmp, pictureBox2.Size);
pictureBox2.Image = bmp2;
string pasta = appPath + pastaimagem;
if (!Directory.Exists(pasta))
{
Directory.CreateDirectory(pasta);
}
pictureBox2.Image.Save(pasta + txtCod.Text + ".bmp", System.Drawing.Imaging.ImageFormat.Bmp);