Click here to Skip to main content
15,892,537 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: program terminates unexpectedly, with no message Pin
mav.northwind1-Sep-04 6:10
mav.northwind1-Sep-04 6:10 
QuestionHow To Save a Crystal Report- SaveAs() Pin
Ranoush31-Aug-04 22:00
Ranoush31-Aug-04 22:00 
AnswerRe: How To Save a Crystal Report- SaveAs() Pin
Steven Campbell1-Sep-04 8:15
Steven Campbell1-Sep-04 8:15 
GeneralCreate XML Document Pin
Pokemon_G31-Aug-04 19:53
Pokemon_G31-Aug-04 19:53 
GeneralRe: Create XML Document Pin
Steven Campbell1-Sep-04 8:16
Steven Campbell1-Sep-04 8:16 
GeneralRe: Create XML Document Pin
DavidNohejl29-Sep-04 12:15
DavidNohejl29-Sep-04 12:15 
QuestionPull data from external file? Pin
Glisson30-Aug-04 12:22
Glisson30-Aug-04 12:22 
GeneralGDI+ question: image jitter when resizing Pin
DivideByNought30-Aug-04 10:29
DivideByNought30-Aug-04 10:29 
I'm resizing multiple 24 bit RGB images from 752x480 to 640x480. When some of the images are resized the interpolation (at least I'm assuming that's the cause) is shifting the image down one pixel; this happens with about 50% of them. Since they're sequential images, which are then saved into a video, this shift causes vertical jitter.

The following is the function I'm using to resize the images. Since I'm only resizing horizontally bilinear is all that's required. I've tried both Bilinear and HighQualityBilinear, neither makes a difference.


public static Image HighQualityResize(Image source, int newWidth, int newHeight, bool useBicubic)<br />
{<br />
	System.Drawing.Bitmap retImage = new System.Drawing.Bitmap(newWidth, newHeight, source.PixelFormat);<br />
	System.Drawing.Graphics graphic = System.Drawing.Graphics.FromImage(retImage);<br />
<br />
	if(useBicubic)<br />
	{<br />
		graphic.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;<br />
	}<br />
	else<br />
	{<br />
	graphic.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bilinear;<br />
	}<br />
<br />
	graphic.DrawImage(source, 0,0, retImage.Width, retImage.Height);<br />
	return retImage;<br />
}



Am I doing something wrong? Is there something that I need to do in addition to remove jitter? I don't understand why this is happening...
GeneralRe: GDI+ question: image jitter when resizing Pin
DivideByNought1-Sep-04 7:59
DivideByNought1-Sep-04 7:59 
GeneralDLL dependency Pin
goldoche30-Aug-04 8:37
goldoche30-Aug-04 8:37 
GeneralRe: DLL dependency Pin
Steven Campbell30-Aug-04 9:05
Steven Campbell30-Aug-04 9:05 
GeneralC# logging utility for Compact Framework Pin
sbasheer30-Aug-04 4:21
sbasheer30-Aug-04 4:21 
GeneralRe: C# logging utility for Compact Framework Pin
Steven Campbell1-Sep-04 8:19
Steven Campbell1-Sep-04 8:19 
GeneralMicrosoft.WindowsCE.Forms Pin
pat27088129-Aug-04 22:23
pat27088129-Aug-04 22:23 
GeneralRe: Microsoft.WindowsCE.Forms Pin
pat27088130-Aug-04 2:58
pat27088130-Aug-04 2:58 
GeneralRe: Microsoft.WindowsCE.Forms Pin
pat27088130-Aug-04 5:29
pat27088130-Aug-04 5:29 
GeneralInstalling Windows Service Pin
Hercules0129-Aug-04 2:39
Hercules0129-Aug-04 2:39 
GeneralRe: Installing Windows Service Pin
Anonymous31-Aug-04 7:59
Anonymous31-Aug-04 7:59 
GeneralRe: Installing Windows Service Pin
Hercules011-Sep-04 20:05
Hercules011-Sep-04 20:05 
GeneralRe: Installing Windows Service Pin
Hercules011-Sep-04 20:09
Hercules011-Sep-04 20:09 
GeneralRe: Installing Windows Service Pin
progload3-Sep-04 11:04
progload3-Sep-04 11:04 
Generalreport from 2 tabels in crystal reports Pin
kings_128-Aug-04 22:43
kings_128-Aug-04 22:43 
GeneralRe: report from 2 tabels in crystal reports Pin
Pradeep Shamarao3-Sep-04 1:41
Pradeep Shamarao3-Sep-04 1:41 
GeneralRe: report from 2 tabels in crystal reports Pin
kings_17-Sep-04 0:57
kings_17-Sep-04 0:57 
QuestionHowto make a shortcut open a program in systray? Pin
NoPickUp28-Aug-04 22:04
NoPickUp28-Aug-04 22:04 

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.