Click here to Skip to main content
15,909,091 members
Home / Discussions / C#
   

C#

 
AnswerRe: PrintDocument clipping / wrapping text problem Pin
Luc Pattyn31-Mar-10 4:46
sitebuilderLuc Pattyn31-Mar-10 4:46 
General[Solved] Re: PrintDocument clipping / wrapping text problem Pin
Mark F.31-Mar-10 5:20
Mark F.31-Mar-10 5:20 
GeneralRe: [Solved] Re: PrintDocument clipping / wrapping text problem Pin
Luc Pattyn31-Mar-10 6:01
sitebuilderLuc Pattyn31-Mar-10 6:01 
QuestionPassing TextWriter through a function Pin
Steve-Co31-Mar-10 2:36
Steve-Co31-Mar-10 2:36 
AnswerRe: Passing TextWriter through a function Pin
Keith Barrow31-Mar-10 2:43
professionalKeith Barrow31-Mar-10 2:43 
GeneralRe: Passing TextWriter through a function Pin
Steve-Co31-Mar-10 2:47
Steve-Co31-Mar-10 2:47 
GeneralRe: Passing TextWriter through a function Pin
Keith Barrow31-Mar-10 2:58
professionalKeith Barrow31-Mar-10 2:58 
GeneralRe: Passing TextWriter through a function Pin
Mirko198031-Mar-10 3:00
Mirko198031-Mar-10 3:00 
AnswerRe: Passing TextWriter through a function Pin
R. Giskard Reventlov31-Mar-10 2:45
R. Giskard Reventlov31-Mar-10 2:45 
GeneralRe: Passing TextWriter through a function Pin
Luc Pattyn31-Mar-10 2:54
sitebuilderLuc Pattyn31-Mar-10 2:54 
GeneralRe: Passing TextWriter through a function Pin
R. Giskard Reventlov31-Mar-10 2:59
R. Giskard Reventlov31-Mar-10 2:59 
AnswerRe: Passing TextWriter through a function Pin
Steve-Co31-Mar-10 2:56
Steve-Co31-Mar-10 2:56 
QuestionSafe thread calls Pin
faheemnadeem31-Mar-10 1:41
faheemnadeem31-Mar-10 1:41 
AnswerRe: Safe thread calls Pin
Luc Pattyn31-Mar-10 1:52
sitebuilderLuc Pattyn31-Mar-10 1:52 
GeneralRe: Safe thread calls Pin
faheemnadeem31-Mar-10 2:04
faheemnadeem31-Mar-10 2:04 
GeneralRe: Safe thread calls Pin
Luc Pattyn31-Mar-10 2:26
sitebuilderLuc Pattyn31-Mar-10 2:26 
GeneralRe: Safe thread calls Pin
faheemnadeem31-Mar-10 2:39
faheemnadeem31-Mar-10 2:39 
AnswerRe: Safe thread calls Pin
Alan N31-Mar-10 3:02
Alan N31-Mar-10 3:02 
GeneralRe: Safe thread calls Pin
faheemnadeem31-Mar-10 3:24
faheemnadeem31-Mar-10 3:24 
AnswerRe: Safe thread calls Pin
faheemnadeem31-Mar-10 21:18
faheemnadeem31-Mar-10 21:18 
QuestionOutof memory exception creating a thumbnail Pin
Mycroft Holmes31-Mar-10 1:21
professionalMycroft Holmes31-Mar-10 1:21 
I have the following method that attempts to create a thumbnail image if it is missing. I get an out of memory exeception on the marked line
		public static void CreateThumbs(DataTable oTable, string sImageFolder)
		{
			try
			{
				string sThumbFolder = System.IO.Path.Combine(sImageFolder, "Thumbs");
				string sUploadFolder = System.IO.Path.Combine(sImageFolder, "Uploads");
				string sThumb, sImage;
				System.IO.FileInfo oImageFile;
				System.IO.FileInfo oThumbFile;

				if (oTable.Columns.Contains("Thumb"))
				{
					foreach (DataRow oRow in oTable.Rows)
					{
						sThumb = System.IO.Path.Combine(sThumbFolder, oRow["FileName"].ToString());
						sImage = System.IO.Path.Combine(sUploadFolder, oRow["FileName"].ToString());
						oThumbFile = new System.IO.FileInfo(sThumb);
						oImageFile = new System.IO.FileInfo(sImage);
						if (!oThumbFile.Exists && oImageFile.Exists)
						{
>>>>> error on this line >>>>				using (System.Drawing.Image oImage = System.Drawing.Image.FromFile(sImage))
							{
								using (System.Drawing.Image oThumbnailImage = oImage.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero))
								{
									oThumbnailImage.Save(sThumb, System.Drawing.Imaging.ImageFormat.Jpeg);
								}
							}
						}
					}
				}
			}
			catch (Exception)
			{ throw; }
		}


I can't actually be out of memory I.m on a win7 64 with 8g memory and a fresh reboot!
Never underestimate the power of human stupidity
RAH

AnswerRe: Outof memory exception creating a thumbnail Pin
Luc Pattyn31-Mar-10 1:58
sitebuilderLuc Pattyn31-Mar-10 1:58 
GeneralRe: Outof memory exception creating a thumbnail Pin
Bernhard Hiller31-Mar-10 2:19
Bernhard Hiller31-Mar-10 2:19 
GeneralRe: Outof memory exception creating a thumbnail Pin
Luc Pattyn31-Mar-10 2:28
sitebuilderLuc Pattyn31-Mar-10 2:28 
GeneralRe: Outof memory exception creating a thumbnail Pin
Mycroft Holmes31-Mar-10 12:09
professionalMycroft Holmes31-Mar-10 12:09 

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.