473,804 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I want to save pictures (bitmap-graphics)

Hello

' I need some help. I've created a little application to paint, save and
load pictures (Bitmap-graphics) into
' a picturebox-object on the desktop. There's no problem to paint or to load
pictures, but how can I save the image?

' My load-routine is the following (if I click on the file-menu and chose
File open...):

Private Sub MenuItem2_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MenuItem2.Click

OpenFileDialog1 .Title = "Datei öffnen..."

OpenFileDialog1 .Filter = "Windows-Bitmap|*.bmp"

OpenFileDialog1 .FilterIndex = 1

OpenFileDialog1 .ShowDialog()

If OpenFileDialog1 .FileName <> "" Then

Dim Filestream As FileStream = New FileStream(Open FileDialog1.Fil eName,
FileMode.Open)

Dim binReader As New Bitmap(Filestre am)

PictureBox1.Ima ge = binReader

Filestream.Clos e()

Else : Return

End IfI

End Sub

' Can I also use the Filestream-object for saving pictures. Thank you for
your help.
Nov 21 '05 #1
1 1707
But in your example, the image is already on disc....

What do you really want to do??

You can save any image with the Save("filename" , ImageFormat.wha tever);
method.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"DSchlichte " <ds********@gmx .net> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
Hello

' I need some help. I've created a little application to paint, save and
load pictures (Bitmap-graphics) into
' a picturebox-object on the desktop. There's no problem to paint or to
load pictures, but how can I save the image?

' My load-routine is the following (if I click on the file-menu and chose
File open...):

Private Sub MenuItem2_Click (ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MenuItem2.Click

OpenFileDialog1 .Title = "Datei öffnen..."

OpenFileDialog1 .Filter = "Windows-Bitmap|*.bmp"

OpenFileDialog1 .FilterIndex = 1

OpenFileDialog1 .ShowDialog()

If OpenFileDialog1 .FileName <> "" Then

Dim Filestream As FileStream = New FileStream(Open FileDialog1.Fil eName,
FileMode.Open)

Dim binReader As New Bitmap(Filestre am)

PictureBox1.Ima ge = binReader

Filestream.Clos e()

Else : Return

End IfI

End Sub

' Can I also use the Filestream-object for saving pictures. Thank you for
your help.

Nov 21 '05 #2

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

Similar topics

3
2025
by: Jim S. | last post by:
Hi guys, i have lots of data for products (with different categories) and pictures that i would need it entered into a database on the website. How would i go about doing so? i was thinking about an excel sheet with each category as a sheet but i have no idea what to do about the pictures that will go with each product, (since i would not want the pictures in the mysql database.) any ideas?
0
1538
by: Michael Schindler | last post by:
I can see my values date and values "S" in the datagrid but if i want save i get the error the cells are null..but i can see. If i chanche the date from 03.03.2003 to manuell 03.03.2003 and change the "S" to manuell "S" i can save this into the database. what can I make that it functions with these zero values?
2
2476
by: zheng | last post by:
ÇçÌì I have a word document and it has a picture object, I want save the picture object as other single picture file by C# program. I have a idea, by clipboard, copy the picture to clipboard, and then save as a file from clipboard, it is work well in application,but don't work in a web application. how can I to do? and are there other ideas to save the picture object in web application? help me !!
1
1224
samycbe
by: samycbe | last post by:
Hi.. I want to save pictures and show on display in my screen. I am using sql-server as a backend. What is the best way to do that. even it is better to store the path only. and display it. please help me... samy
25
38107
wassup
by: wassup | last post by:
Hi all, This my 1st time to get help at forum. So my problem is I have a form with some textbox inside and I want save the data that key in inside textbox to the Excel format that I create and the specified cell that I want it save into. Example, my Excel report's name is "Manual Visual Report", and one of the vb textbox is "Date". Lets say I want that textbox date save inside "Manual Visual Report", worksheet "LineA1", cell (5,4), so how to...
3
1494
by: rudeman76 | last post by:
Hello, I am working on an incident form. I have 4 set text boxes and up to 4 drop-down boxes on the form. The user enters in the date then time. I have 4 option buttons for the user to select the number of security involved. When the user selects the number of security, the corrisponding drop-down boxes appear (eg. if they select 3 security, 3 drop-down boxes appear). The drop-down boxes have a list of names (populated by a query). The...
0
1656
by: minex | last post by:
Hi, I have a simple photoslideshow. Now I would like to put several pictures in a database and that during the year, on specified dates the pictures in the flash animation change. example: in january: pic 1,pic 2 and pic 3 in february: pic 4, Pic 5 and pic 6 If I want other pictures on the slideshow, I would like to simply put other pictures in the database.
6
2509
mageswar005
by: mageswar005 | last post by:
Hello Guys, I want to Avoid the Save option when i click the download link in php . I just want open and cancel option only, i dont want save option when i click the download link in php.How to avoid the save option bec for file security reason. Detail Description: Language i used : PHP Db i used : Mysql First i upload the file in my application, then i give one link(click here to open) in php,...
4
1600
arkhe3
by: arkhe3 | last post by:
<?php ob_start(); include("top.php"); include("tabletop.php"); if ( empty($_SESSION) AND empty($_SESSION) AND empty($_GET) ) { echo "giriþ yapmadýnýz!";}else{ $ilan=$_GET; $sql=mysql_query("select tur from ilanayrinti$ilan where tur='resim'"); $sayisi=mysql_num_rows($sql); $sqla=mysql_query("update ilan set resim=$sayisi where id=$ilan");
0
9715
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10603
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9176
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
7643
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
5536
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
5675
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4314
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
2
3836
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.