Connecting Tech Pros Worldwide Help | Site Map

saving pictures

enrico via DotNetMonster.com
Guest
 
Posts: n/a
#1: Jul 22 '08
how do i open, save and retrieve pictures? with mySQL as my database.

--
Message posted via http://www.dotnetmonster.com

=?Utf-8?B?U3VydHVyWg==?=
Guest
 
Posts: n/a
#2: Jul 22 '08

re: saving pictures


To load a Picture
Using MyImage As Bitmap = Bitmap.FromFile("C:\Temp\MyImage.BMP")

Draw on it with
Using g as Graphics = Graphics.FromImage(MyImage)

and then use g.DrawLine, g.DrawString etc

Use .Save to save the image.

To read/write the image to a database, use a BLOB field, and the Stream
versions of .Save and .Load

--
David Streeter
Synchrotech Software
Sydney Australia


"enrico via DotNetMonster.com" wrote:
Quote:
how do i open, save and retrieve pictures? with mySQL as my database.
>
--
Message posted via http://www.dotnetmonster.com
>
>
=?Utf-8?B?U3VydHVyWg==?=
Guest
 
Posts: n/a
#3: Jul 22 '08

re: saving pictures


P.S. I've been working on this article at wikibooks:
http://en.wikibooks.org/wiki/Visual_Basic_.NET/GDI%2B
--
David Streeter
Synchrotech Software
Sydney Australia


"enrico via DotNetMonster.com" wrote:
Quote:
how do i open, save and retrieve pictures? with mySQL as my database.
>
--
Message posted via http://www.dotnetmonster.com
>
>
=?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?=
Guest
 
Posts: n/a
#4: Jul 22 '08

re: saving pictures


enrico via DotNetMonster.com wrote:
Quote:
how do i open, save and retrieve pictures? with mySQL as my database.
>
Unless you need to draw on the image, you should treat the image file
just like any other binary file.

http://www.google.se/search?q=mysql+store+file

--
Göran Andersson
_____
http://www.guffa.com
Cor Ligthert[MVP]
Guest
 
Posts: n/a
#5: Jul 22 '08

re: saving pictures


Enrico,

See these samples, be aware that saving a image to an SQL column is terrible
slow.

http://www.vb-tips.com/DataSetImage.aspx

In version SQL server 2008 is made some extra to save the images to disk,
while virtual urls are placed to that in a column in the tables.

You can do that in a way of course as well in all SQL servers before 2008.

Cor

"enrico via DotNetMonster.com" <u41845@uweschreef in bericht
news:878087ce0c73d@uwe...
Quote:
how do i open, save and retrieve pictures? with mySQL as my database.
>
--
Message posted via http://www.dotnetmonster.com
>
Closed Thread