473,327 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

How to save or move image from a picturebox to a folder?

Prathap
37
Here is my code to save image in a folder,but i am getting this error(a generic error occurred in gdi+).
Could someone please help me?

Expand|Select|Wrap|Line Numbers
  1.     Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
  2.         If (Not System.IO.Directory.Exists("d:/posimage")) Then
  3.             System.IO.Directory.CreateDirectory("d:/posimage")
  4.         End If
  5. PictureBox1.Image.Save("d:/posimage")
  6. End sub
Jan 3 '12 #1
1 18572
IronRazer
83 64KB
Hello Prathap,
Try this to save your picture. I have used it in my programs so i know it works. You can also change the ImageFormat.jpeg to bmp or png to get the picture format you want to use.

Expand|Select|Wrap|Line Numbers
  1. PictureBox1.Image.Save("d:/posimage.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
Jan 19 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: thomaz | last post by:
I would like to know the correct way to save an image showing in a Picture Box???? Thanks....
1
by: news.austin.rr.com | last post by:
hi im using the following code below to gain access to a browser control document. mshtml.IHTMLDocument2 doc = axWebBrowser1.Document as mshtml.IHTMLDocument2; can i use the "doc" object...
15
by: dgk | last post by:
I'm trying to save the image of a webbrowser control. Not a particular image being shown on the page, but rather the visible display of the webbrowser. Using VS2005 I figured that maybe...
2
by: gopinathar83 | last post by:
hi i have one prob i want move image from one location to another location in Picturebox just like move the vechile on the road
1
by: Smita Kashyap | last post by:
Hello to all, Which one is flexible/optimal solution to save uplaoded image. Frist save image at server or from where you're site pages are save in any image folder and save only image name or...
4
by: =?iso-8859-1?B?RulybmFz?= | last post by:
Hello all, How can I save a image that is on internet (eg: http://www.agalera.com.br/_img/layout/logo.gif)??? I would like to save the image on my server... many thanks
1
by: kiekar | last post by:
Hello, A yes or no answer would be much appreciated. I have a word document which has a sqlxml annotated schema mapped to it. On the word document there is a image inserted to it. Is it possible...
0
by: admiralato | last post by:
Hi guys, I need to insert an image to an email. The IMAGE.SRC of the image is from a file named, Graphics.aspx. What I'm thinking is in order for me to include the generated image in the email,...
6
by: jeddiki | last post by:
Hi, I am using snapcasa.com to provide me with an image. They encourage you to cache the images on your own server so I am trying to do that. When I use this code to display the image it...
0
by: sahil khan | last post by:
how i can use image list control in vb.net, and how to save jpeg image with customer record and i wnat to also save this data base ms access.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.