Click here to Skip to main content
15,917,862 members
Home / Discussions / C#
   

C#

 
JokeRe: Opacity Control Pin
Dustin Metzgar22-Jun-06 5:14
Dustin Metzgar22-Jun-06 5:14 
GeneralRe: Opacity Control Pin
Alexander Wiseman22-Jun-06 5:24
Alexander Wiseman22-Jun-06 5:24 
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 
The image is drawn in another method ("DrawGraphics") but I didn't include it because it is very long

this it is a summary of the code:

public System.Drawing.Bitmap CreateBitmap( )
{
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap( widthBmp, heightBmp );
System.Drawing.Graphics g = System.Drawing.Graphics.FromImage( bmp );

DrawGraphics( g, new System.Drawing.Point( 0, 0 ) );
g.Dispose( );

return bmp;
}


System.Drawing.Bitmap bmp = CreateBitmap();
// make a memory stream to work with the image bytes
MemoryStream stream = new MemoryStream();
// put the image into the memory stream
bmp.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
// make byte array the same size as the image
byte[] buffer = new Byte[stream.Length];
// rewind the memory stream
stream.Position = 0;
// load the byte array with the image
stream.Read(buffer, 0, (int) buffer.Length);

then

save the image in sql database, but the array of bytes (variable buffer) has no images, it´s totally black...

Thank you for the answer


Abel Castillo
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 
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 

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.