473,749 Members | 2,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Prathap
37 New Member
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 18777
IronRazer
83 New Member
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.jpe g 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
1729
by: thomaz | last post by:
I would like to know the correct way to save an image showing in a Picture Box???? Thanks....
1
1867
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 (doc.images) to access the images and then do something to save the image to a file? im new at this... Thanks
15
7195
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 DrawToBitmap would work, but it appears that the webbrowser doesn't implement it. So I looked around and found that this code: Dim g As Graphics g.CopyFromScreen(Me.wb1.PointToScreen(New Point(0, 0)), New Point(0, 0), wb1.Size)
2
3080
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
2832
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 link to database. Secondly convert image to bite form then save whole bite form image to database. My friends feel that second one is right choice, but i felt that frist one is correct as conversion procedure and retrival from database is...
4
20656
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
1728
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 to save the image to an xml document with a base64Binary datatype? The reason I ask is when I do save the word document as an xml document the image binary data is not saved but the other datatypes do. In the schema I have a element written as ...
0
1026
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, I need to save the image first to disk. How do I do that? Here's a preview of what I'm trying to do, at the end of the page you'll see an image, that image is what i'm trying to insert in an email when a user clicks the button. ...
6
3449
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 works fine: <img src=\"http://snapcasa.com/get.aspx?code=9360&size=l&url=$Db_url\" width='300px' height='200px' alt='Thumbnail for $title_sht'>
0
1262
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
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.