problem in saving an image in windows application
-
Hello to all guys, I am having a problem in windows application I have a button through which i can select an image using openfiledialog and thn after the path of the selected image is shown in another textbox but after tht m wanna to save tht save into another fold using savefiledialog but i cant do it for save an image i use this code Bitmap bit = new Bitmap(saveFileDialog1.FileName); bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); but it doesnt work can anyone help in it
-
Hello to all guys, I am having a problem in windows application I have a button through which i can select an image using openfiledialog and thn after the path of the selected image is shown in another textbox but after tht m wanna to save tht save into another fold using savefiledialog but i cant do it for save an image i use this code Bitmap bit = new Bitmap(saveFileDialog1.FileName); bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); but it doesnt work can anyone help in it
Arun kumar Gautam wrote:
but it doesnt work
You need to tell us exactly what that means. However:
Bitmap bit = new Bitmap(saveFileDialog1.FileName);
bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);Are you sure you want to create the
Bitmap
from the filename in theSaveFileDialog
?Use the best guess
-
Arun kumar Gautam wrote:
but it doesnt work
You need to tell us exactly what that means. However:
Bitmap bit = new Bitmap(saveFileDialog1.FileName);
bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg);Are you sure you want to create the
Bitmap
from the filename in theSaveFileDialog
?Use the best guess
Bitmap bit = new Bitmap(openFileDialog1.FileName); bit.Save(saveFileDialog1.FileName); and for saving it as jpg you can either add extension while giving it name in save file dialog or you can add filter in property window of save file dialog under filter property add JPeg Image|*.jpg
-
Bitmap bit = new Bitmap(openFileDialog1.FileName); bit.Save(saveFileDialog1.FileName); and for saving it as jpg you can either add extension while giving it name in save file dialog or you can add filter in property window of save file dialog under filter property add JPeg Image|*.jpg
-
Hello to all guys, I am having a problem in windows application I have a button through which i can select an image using openfiledialog and thn after the path of the selected image is shown in another textbox but after tht m wanna to save tht save into another fold using savefiledialog but i cant do it for save an image i use this code Bitmap bit = new Bitmap(saveFileDialog1.FileName); bit.Save(saveFileDialog1.FileName, System.Drawing.Imaging.ImageFormat.Jpeg); but it doesnt work can anyone help in it
Bitmap bit = new Bitmap(openFileDialog1.FileName); bit.Save(saveFileDialog1.FileName); and for saving it as jpg you can either add extension while giving it name in save file dialog or you can add filter in property window of save file dialog under filter property add JPeg Image|*.jpg