473,378 Members | 1,492 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,378 software developers and data experts.

how to save content of picturebox to jpg or bmp??

MJ
anyone can provide the codind to save the content of a picturebox to jpg or bmp??
Nov 20 '05 #1
1 3172

You need to create a stream object and then use the "Image.Save" method.
You can save to a memory or file stream. For my database management thingy,
I'm saving to a memory stream (below), but same principle applies to files.

Dim stream As New System.IO.MemoryStream

theImage.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg)
"MJ" <an*******@discussions.microsoft.com> wrote in message
news:1F**********************************@microsof t.com...
anyone can provide the codind to save the content of a picturebox to jpg

or bmp??
Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Pavan Arise | last post by:
Dear all.. I have a picturebox filled on a form. The picturebox has some graphics displayed on it.I was trying to save the picturebox, but continuesly failed to do so. I am clueless of why it is...
2
by: Michael Lehar | last post by:
Hallo I have a pictureBox with a picture loaded from file, then I draw some lines on the picture, and then I want to save the new picture. Befor I can draw lines I have to create a Graphics...
7
by: user | last post by:
Hello I tried: pictureBox1.Image.Save("file.sav"); compiled, but when i run i receive errors: Additional information: Object reference not set to an instance of an object. Why ?
12
by: yaya via DotNetMonster.com | last post by:
Hi, I have a picture box with circles and rectangles, and I wana save all the images into a jpg file, i tried pictureBox1.Image.Save(@"c:\1.jpg"); but I got and error...
1
by: MJ | last post by:
anyone can provide the codind to save the content of a picturebox to jpg or bmp??
1
by: John | last post by:
I use drawline and drawstring to create something in a picturebox and want to save the content of that picturebox as a bitmap, is that possible and how? Thank.
1
by: ham Come> | last post by:
I have an application with has some drawing operations the code is sth like this: For i as integer = 0 to 100 dim g as graphics g = me.pictureBox1.CreateGraphics g.Draw sth... ... Next i ...
4
by: Yash | last post by:
Have used DrawLine() method to draw some lines in the picturebox (sort of a barcode) in the picturebox paint event. This diagram has to be saved as an image in bmp or tiff format. But the problem...
10
by: eddie tan | last post by:
Hi, I have a picturebox with graphics drawn from different objects. In one object I used Pen P1; P1 = new Pen(Color.Blue, 3); Graphics g = null; g = Graphics.FromImage(image.Image);...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.