Click here to Skip to main content
16,003,356 members
Home / Discussions / C#
   

C#

 
RantRe: C# Multimedia controls [not an answer] Pin
jano_rajmond11-Apr-09 8:38
jano_rajmond11-Apr-09 8:38 
RantRe: C# Multimedia controls Pin
Luc 64801111-Apr-09 8:36
Luc 64801111-Apr-09 8:36 
JokeRe: C# Multimedia controls Pin
jano_rajmond11-Apr-09 8:42
jano_rajmond11-Apr-09 8:42 
AnswerRe: C# Multimedia controls [edited] Pin
Mycroft Holmes11-Apr-09 15:41
professionalMycroft Holmes11-Apr-09 15:41 
QuestionCDATA Object Pin
ytubis11-Apr-09 6:49
ytubis11-Apr-09 6:49 
AnswerRe: CDATA Object Pin
Colin Angus Mackay11-Apr-09 7:46
Colin Angus Mackay11-Apr-09 7:46 
QuestionWhy i need to wait so long..... Pin
VisualLive11-Apr-09 6:02
VisualLive11-Apr-09 6:02 
AnswerRe: Why i need to wait so long..... Pin
Luc 64801111-Apr-09 6:28
Luc 64801111-Apr-09 6:28 
ascotravel wrote:
Do you have any advice where i wrong in my code?


yes.

1.
it is better to use Image.FromStream() rather than Image.FromFile() since the latter keeps the file locked. This is however not affecting performance AFAIK.

2.
it is much better to dispose of all objects you don't need any longer provided their class offers a public Dispose() method. Image class does, so don't just abandon img by assigning a new image to it, first do a if(img!null) img.Dispose(); That will reduce your memory consumption, reducing the work of the garbage collector.

3.
the basic idea of thumbnail images is you don't calculate them over and over; e.g. have your program create thumbnail files (with a modified filename), and look for them when loading. That will avoid the file load and the computation. For small images, avoid compressed formats such as JPEG; use BMP or GIF instead.

BTW: although some image formats support a built-in thumbnail, these are not always present. Furthermore the quality of GetThumbnailImage() is rumored to be not good.

Smile | :)
AnswerRe: Why i need to wait so long..... Pin
0x3c011-Apr-09 6:31
0x3c011-Apr-09 6:31 
GeneralRe: Why i need to wait so long..... Pin
VisualLive11-Apr-09 7:24
VisualLive11-Apr-09 7:24 
GeneralRe: Why i need to wait so long..... Pin
Luc 64801111-Apr-09 7:44
Luc 64801111-Apr-09 7:44 
GeneralRe: Why i need to wait so long..... [modified] Pin
VisualLive11-Apr-09 8:03
VisualLive11-Apr-09 8:03 
GeneralRe: Why i need to wait so long..... Pin
0x3c011-Apr-09 9:33
0x3c011-Apr-09 9:33 
AnswerRe: Why i need to wait so long..... Pin
Luc 64801111-Apr-09 8:21
Luc 64801111-Apr-09 8:21 
GeneralRe: Why i need to wait so long..... Pin
VisualLive11-Apr-09 8:57
VisualLive11-Apr-09 8:57 
GeneralRe: Why i need to wait so long..... Pin
Luc 64801111-Apr-09 10:01
Luc 64801111-Apr-09 10:01 
GeneralRe: Why i need to wait so long..... Pin
VisualLive12-Apr-09 18:26
VisualLive12-Apr-09 18:26 
QuestionResize Objects Pin
ytubis11-Apr-09 4:53
ytubis11-Apr-09 4:53 
AnswerRe: Resize Objects Pin
0x3c011-Apr-09 4:59
0x3c011-Apr-09 4:59 
QuestionDLL Pin
Rajdeep.NET is BACK11-Apr-09 4:39
Rajdeep.NET is BACK11-Apr-09 4:39 
AnswerRe: DLL Pin
0x3c011-Apr-09 4:42
0x3c011-Apr-09 4:42 
QuestionHow I start with Crystal Report Programaticlly? Pin
magdyeltahaan11-Apr-09 3:40
magdyeltahaan11-Apr-09 3:40 
AnswerRe: How I start with Crystal Report Programaticlly? Pin
0x3c011-Apr-09 3:43
0x3c011-Apr-09 3:43 
QuestionLoad a big file to a textbox Pin
CheatCat11-Apr-09 3:23
CheatCat11-Apr-09 3:23 
AnswerRe: Load a big file to a textbox Pin
0x3c011-Apr-09 3:34
0x3c011-Apr-09 3:34 

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.