Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
QuestionCrystal report Pin
Thomas Abegglen17-Mar-06 19:52
Thomas Abegglen17-Mar-06 19:52 
QuestionColumn Click with right mouse button ? Pin
CiNN17-Mar-06 19:35
CiNN17-Mar-06 19:35 
AnswerRe: Column Click with right mouse button ? Pin
[Gone]18-Mar-06 5:52
[Gone]18-Mar-06 5:52 
Questionretrieving a command button property strored from the database Pin
Cagalli17-Mar-06 19:34
Cagalli17-Mar-06 19:34 
QuestionStrategy Issue, Please Help Pin
student_rhr17-Mar-06 18:12
student_rhr17-Mar-06 18:12 
AnswerRe: Strategy Issue, Please Help Pin
leppie17-Mar-06 22:23
leppie17-Mar-06 22:23 
GeneralRe: Strategy Issue, Please Help Pin
student_rhr18-Mar-06 8:58
student_rhr18-Mar-06 8:58 
QuestionGDI+, resize image QUALITY! Pin
knoppis17-Mar-06 14:09
knoppis17-Mar-06 14:09 
Hi!

I have a little code to resize and watermark images. The problem is that it generates images with really poor quality. I have a comparison below with my results with code and PhotoShop, what I want is to make the code generate a copy with the same quality as PhotoShop, if it's possible. You just have to tell me what to add and where! Please!

These images are automatically resized from a much bigger image found at:
http://www.foh.nu/heli.jpg[^]

Generated with code: http://www.foh.nu/heli1.jpg[^]
Generated with PhotoShop: http://www.foh.nu/heli2.jpg[^]

Don't change too much in the code, I still have to remain the canvas and image as is, becouse I have to draw more images into the canvas later on, for protection (copyright image, transparent, etc.)

This is the code at the moment:

<br />
	void makeThumbnail()<br />
	{<br />
		System.Drawing.Image image = System.Drawing.Image.FromFile("C:\\Inetpub\\wwwroot\\heli.jpg");<br />
		Bitmap canvas = new Bitmap(200, 283, image.PixelFormat);<br />
<br />
		Graphics g = Graphics.FromImage(canvas);<br />
<br />
		g.DrawImage(image, 0, 0, 200, 283);<br />
<br />
		canvas.Save("C:\\Inetpub\\wwwroot\\1.jpg", ImageFormat.Jpeg);<br />
<br />
		image.Dispose();<br />
		canvas.Dispose();<br />
	}<br />


Hope you can help! Cheers!

-- modified at 20:10 Friday 17th March, 2006
AnswerRe: GDI+, resize image QUALITY! Pin
leppie17-Mar-06 14:39
leppie17-Mar-06 14:39 
AnswerRe: GDI+, resize image QUALITY! Pin
Nicholas Butler18-Mar-06 1:18
sitebuilderNicholas Butler18-Mar-06 1:18 
GeneralRe: GDI+, resize image QUALITY! Pin
knoppis18-Mar-06 4:24
knoppis18-Mar-06 4:24 
AnswerRe: GDI+, resize image QUALITY! Pin
Nicholas Butler18-Mar-06 4:33
sitebuilderNicholas Butler18-Mar-06 4:33 
GeneralRe: GDI+, resize image QUALITY! Pin
knoppis18-Mar-06 4:36
knoppis18-Mar-06 4:36 
AnswerRe: GDI+, resize image QUALITY! Pin
Nicholas Butler18-Mar-06 4:40
sitebuilderNicholas Butler18-Mar-06 4:40 
GeneralRe: GDI+, resize image QUALITY! Pin
knoppis18-Mar-06 4:42
knoppis18-Mar-06 4:42 
GeneralRe: GDI+, resize image QUALITY! Pin
knoppis18-Mar-06 4:45
knoppis18-Mar-06 4:45 
QuestionRe: GDI+, resize image QUALITY! Pin
Nicholas Butler18-Mar-06 4:55
sitebuilderNicholas Butler18-Mar-06 4:55 
AnswerRe: GDI+, resize image QUALITY! Pin
knoppis18-Mar-06 5:21
knoppis18-Mar-06 5:21 
AnswerRe: GDI+, resize image QUALITY! Pin
Robert Rohde18-Mar-06 6:07
Robert Rohde18-Mar-06 6:07 
QuestionConnecting to DB2 in C# Pin
jjm40017-Mar-06 11:40
jjm40017-Mar-06 11:40 
AnswerRe: Connecting to DB2 in C# Pin
Mike Dimmick17-Mar-06 13:57
Mike Dimmick17-Mar-06 13:57 
QuestionRe: Connecting to DB2 in C# Pin
jjm40020-Mar-06 3:09
jjm40020-Mar-06 3:09 
QuestionDataview question Pin
Tom Wright17-Mar-06 10:36
Tom Wright17-Mar-06 10:36 
AnswerRe: Dataview question Pin
Tom Larsen17-Mar-06 10:43
Tom Larsen17-Mar-06 10:43 
GeneralRe: Dataview question Pin
Tom Wright17-Mar-06 10:47
Tom Wright17-Mar-06 10:47 

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.