Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Outof memory exception creating a thumbnail Pin
Luc Pattyn31-Mar-10 12:29
sitebuilderLuc Pattyn31-Mar-10 12:29 
GeneralRe: Outof memory exception creating a thumbnail Pin
Mycroft Holmes31-Mar-10 12:58
professionalMycroft Holmes31-Mar-10 12:58 
QuestionPointToScreen and multiple monitors Pin
vlasto7731-Mar-10 1:18
vlasto7731-Mar-10 1:18 
AnswerRe: PointToScreen and multiple monitors Pin
V.31-Mar-10 3:03
professionalV.31-Mar-10 3:03 
GeneralRe: PointToScreen and multiple monitors Pin
vlasto7731-Mar-10 3:14
vlasto7731-Mar-10 3:14 
GeneralRe: PointToScreen and multiple monitors Pin
V.31-Mar-10 3:26
professionalV.31-Mar-10 3:26 
QuestionHow to Save/Store non serializable objects Pin
Anindya Chatterjee31-Mar-10 1:06
Anindya Chatterjee31-Mar-10 1:06 
AnswerRe: d How to Save/Store non serializable objects Pin
Keith Barrow31-Mar-10 1:17
professionalKeith Barrow31-Mar-10 1:17 
AnswerRe: How to Save/Store non serializable objects Pin
Bernhard Hiller31-Mar-10 2:16
Bernhard Hiller31-Mar-10 2:16 
QuestionThousand Seperator Pin
Sasmi_Office31-Mar-10 0:53
Sasmi_Office31-Mar-10 0:53 
AnswerRe: Thousand Seperator Pin
#realJSOP31-Mar-10 1:50
professional#realJSOP31-Mar-10 1:50 
AnswerRe: Thousand Seperator Pin
Eddy Vluggen31-Mar-10 1:55
professionalEddy Vluggen31-Mar-10 1:55 
QuestionPrevent access to directory Pin
Maddie from Dartford31-Mar-10 0:26
Maddie from Dartford31-Mar-10 0:26 

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.