Click here to Skip to main content
15,887,267 members
Home / Discussions / C#
   

C#

 
GeneralRe: Invoke/Thread Pin
myNameIsRon23-Sep-08 19:30
myNameIsRon23-Sep-08 19:30 
GeneralRe: Invoke/Thread Pin
Mohammad Dayyan24-Sep-08 3:45
Mohammad Dayyan24-Sep-08 3:45 
AnswerRe: Invoke/Thread Pin
Mark Churchill23-Sep-08 22:59
Mark Churchill23-Sep-08 22:59 
GeneralRe: Invoke/Thread Pin
myNameIsRon24-Sep-08 4:30
myNameIsRon24-Sep-08 4:30 
GeneralRe: Invoke/Thread Pin
Mark Churchill24-Sep-08 18:56
Mark Churchill24-Sep-08 18:56 
GeneralRe: Invoke/Thread Pin
myNameIsRon24-Sep-08 19:47
myNameIsRon24-Sep-08 19:47 
QuestionOut of memory error Pin
Xmen Real 23-Sep-08 17:14
professional Xmen Real 23-Sep-08 17:14 
AnswerRe: Out of memory error Pin
N a v a n e e t h23-Sep-08 17:26
N a v a n e e t h23-Sep-08 17:26 
Image,Graphics and Bitmap has a Dispose method which has to be called after using. GDI classes are making unmanaged code extensively. Wrap above said classes usage into using blocks which ensures Dispose call.
if (!tmp_filePaths[a].EndsWith(".txt"))
{
     using (Image tmp_image = Image.FromFile(tmp_filePaths[a]))
     {
          int newwidth = roundToNearestPixel(tmp_image.Width);
          int newheight = roundToNearestPixel(tmp_image.Height);
          using (Bitmap tmp_bmp = new Bitmap(newwidth, newheight))
          using (Graphics tmp_gra = Graphics.FromImage(tmp_bmp))
          {
               tmp_gra.DrawImage(tmp_image, 0, 0, newwidth, newheight);
               tmp_bmp.Save(@"D:\texts\" + Path.GetFileNameWithoutExtension(tmp_filePaths[a]) +
                           ".png", System.Drawing.Imaging.ImageFormat.Png);
           }
      }
}
If the image you are loading is too big, I doubt Image class can handle it.

Xmen wrote:
Xal.Clear(); // ArrayList


Use a generic List<string>, so you avoid casting.

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

GeneralRe: Out of memory error Pin
Xmen Real 23-Sep-08 17:36
professional Xmen Real 23-Sep-08 17:36 
GeneralRe: Out of memory error Pin
N a v a n e e t h23-Sep-08 17:53
N a v a n e e t h23-Sep-08 17:53 
GeneralRe: Out of memory error Pin
Xmen Real 23-Sep-08 18:12
professional Xmen Real 23-Sep-08 18:12 
GeneralRe: Out of memory error Pin
N a v a n e e t h23-Sep-08 18:14
N a v a n e e t h23-Sep-08 18:14 
GeneralRe: Out of memory error Pin
Xmen Real 23-Sep-08 19:40
professional Xmen Real 23-Sep-08 19:40 
GeneralRe: Out of memory error Pin
leppie23-Sep-08 21:31
leppie23-Sep-08 21:31 
QuestionNeed to clarify Pin
Member 409922223-Sep-08 15:32
Member 409922223-Sep-08 15:32 
AnswerRe: Need to clarify Pin
Mark Salsbery23-Sep-08 16:11
Mark Salsbery23-Sep-08 16:11 
GeneralRe: Need to clarify Pin
Member 409922223-Sep-08 16:58
Member 409922223-Sep-08 16:58 
GeneralRe: Need to clarify Pin
Mark Salsbery23-Sep-08 18:43
Mark Salsbery23-Sep-08 18:43 
AnswerRe: Need to clarify Pin
N a v a n e e t h23-Sep-08 17:30
N a v a n e e t h23-Sep-08 17:30 
AnswerRe: Need to clarify Pin
Steve Echols23-Sep-08 17:42
Steve Echols23-Sep-08 17:42 
QuestionXML Pin
CodingYoshi23-Sep-08 15:27
CodingYoshi23-Sep-08 15:27 
AnswerRe: XML Pin
N a v a n e e t h23-Sep-08 17:35
N a v a n e e t h23-Sep-08 17:35 
GeneralRe: XML Pin
CodingYoshi24-Sep-08 3:58
CodingYoshi24-Sep-08 3:58 
GeneralRe: XML Pin
N a v a n e e t h24-Sep-08 6:55
N a v a n e e t h24-Sep-08 6:55 
AnswerRe: XML Pin
Mark Churchill23-Sep-08 23:03
Mark Churchill23-Sep-08 23:03 

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.