Click here to Skip to main content
15,910,787 members
Home / Discussions / C#
   

C#

 
GeneralRe: Opacity Control Pin
Cubzfan22-Jun-06 5:11
Cubzfan22-Jun-06 5:11 
GeneralRe: Opacity Control Pin
Dustin Metzgar22-Jun-06 5:35
Dustin Metzgar22-Jun-06 5:35 
GeneralRe: Opacity Control Pin
Dustin Metzgar22-Jun-06 6:48
Dustin Metzgar22-Jun-06 6:48 
QuestionGraph to image Pin
Abel Castillo21-Jun-06 6:03
Abel Castillo21-Jun-06 6:03 
AnswerRe: Graph to image Pin
mikanu21-Jun-06 6:32
mikanu21-Jun-06 6:32 
GeneralRe: Graph to image Pin
Abel Castillo21-Jun-06 7:08
Abel Castillo21-Jun-06 7:08 
GeneralRe: Graph to image Pin
mikanu21-Jun-06 8:09
mikanu21-Jun-06 8:09 
GeneralRe: Graph to image [modified] Pin
Abel Castillo21-Jun-06 23:15
Abel Castillo21-Jun-06 23:15 
I agree with you, I have no problems to save the image to a SQL database and to show it in a PictureBox. But when I tried to save in a array of bytes Frown | :( ...

I'm working with the code of the excellent article Creating EAN-13 Barcodes with C#[^] by rainman_63. I generate the barcodes of several articles and I need to pass them to a database SQL, I have carried out several tests but up to now without success.

Ean13 ean13 = new Ean13();<br />
ean13.CountryCode      = "84";<br />
ean13.ManufacturerCode = "862";<br />
ean13.ProductCode      = "3274243";<br />
ean13.ChecksumDigit    = "7";<br />
ean13.Scale            = 1f;<br />
Bitmap bmp = ean13.CreateBitmap();<br />
<br />
MemoryStream stream = new MemoryStream();<br />
bmp.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);<br />
byte[] buffer = new Byte[stream.Length];<br />
stream.Position = 0;<br />
stream.Read(buffer, 0, (int) buffer.Length);


here save barcodes (buffer) in a SQL database

buffer = null;<br />
stream.Close();



Thanks a lot

Abel Castillo

-- modified at 5:16 Thursday 22nd June, 2006
GeneralRe: Graph to image Pin
Abel Castillo22-Jun-06 0:57
Abel Castillo22-Jun-06 0:57 
GeneralRe: Graph to image [modified] Pin
mikanu22-Jun-06 6:37
mikanu22-Jun-06 6:37 
GeneralRe: Graph to image Pin
Abel Castillo22-Jun-06 22:29
Abel Castillo22-Jun-06 22:29 
GeneralRe: Graph to image Pin
mikanu23-Jun-06 9:04
mikanu23-Jun-06 9:04 
GeneralRe: Graph to image Pin
Abel Castillo26-Jun-06 22:01
Abel Castillo26-Jun-06 22:01 
AnswerRe: Graph to image Pin
Josh Smith21-Jun-06 7:06
Josh Smith21-Jun-06 7:06 
Questionc# draw on vidoe Pin
eyale21-Jun-06 5:50
eyale21-Jun-06 5:50 
AnswerRe: c# draw on vidoe Pin
BlackDice21-Jun-06 6:24
BlackDice21-Jun-06 6:24 
GeneralRe: c# draw on vidoe Pin
led mike21-Jun-06 7:15
led mike21-Jun-06 7:15 
GeneralRe: c# draw on vidoe Pin
BlackDice21-Jun-06 7:38
BlackDice21-Jun-06 7:38 
GeneralRe: c# draw on vidoe Pin
led mike21-Jun-06 7:48
led mike21-Jun-06 7:48 
GeneralRe: c# draw on vidoe Pin
eyale22-Jun-06 8:08
eyale22-Jun-06 8:08 
GeneralRe: c# draw on vidoe Pin
led mike22-Jun-06 9:42
led mike22-Jun-06 9:42 
QuestionInstantiate Bitmap object from unmanaged memory/ Memory Allocation ? [modified] Pin
Florian Storck21-Jun-06 5:45
Florian Storck21-Jun-06 5:45 
Questioncheckinf for USB connection Pin
donkaiser21-Jun-06 4:20
donkaiser21-Jun-06 4:20 
QuestionError:- Could not access 'CDO.Message' object. Pin
nachisaravanan21-Jun-06 3:22
nachisaravanan21-Jun-06 3:22 
AnswerRe: Error:- Could not access 'CDO.Message' object. Pin
Not Active21-Jun-06 4:24
mentorNot Active21-Jun-06 4:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.