Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
GeneralRe: Opacity Control Pin
Alexander Wiseman21-Jun-06 11:59
Alexander Wiseman21-Jun-06 11:59 
GeneralRe: Opacity Control Pin
Cubzfan21-Jun-06 12:17
Cubzfan21-Jun-06 12:17 
GeneralRe: Opacity Control Pin
Alexander Wiseman21-Jun-06 13:11
Alexander Wiseman21-Jun-06 13:11 
GeneralRe: Opacity Control Pin
Cubzfan21-Jun-06 13:52
Cubzfan21-Jun-06 13:52 
GeneralRe: Opacity Control Pin
Cubzfan22-Jun-06 3:58
Cubzfan22-Jun-06 3:58 
GeneralRe: Opacity Control Pin
Dustin Metzgar22-Jun-06 4:24
Dustin Metzgar22-Jun-06 4:24 
GeneralRe: Opacity Control Pin
Cubzfan22-Jun-06 4:40
Cubzfan22-Jun-06 4:40 
GeneralRe: Opacity Control Pin
Dustin Metzgar22-Jun-06 5:00
Dustin Metzgar22-Jun-06 5:00 
GeneralRe: Opacity Control Pin
Alexander Wiseman22-Jun-06 5:08
Alexander Wiseman22-Jun-06 5:08 
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 
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 
This works for me:

private void button1_Click(object sender, System.EventArgs e)
{
	using( Bitmap bmp = new Bitmap( 50, 50 ) )
	using( Graphics grfx = Graphics.FromImage( bmp ) )
	{
		grfx.FillRectangle( Brushes.Red, new Rectangle(0,0,50,50) );
		using( FileStream stream = new FileStream( @"C:\test.jpg", FileMode.Create ) )
		{
			bmp.Save( stream, System.Drawing.Imaging.ImageFormat.Jpeg );
		}
	}
}


I think the difference between our code is that I am saving to a FileStream, but you are saving to a MemoryStream. Your stream does not send the image to a file.

Josh

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.