Click here to Skip to main content
15,905,148 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello, I want to work with images.which classes perform the best and has the best running time in working with them?thanks
Posted
Comments
Sergey Alexandrovich Kryukov 14-Jun-11 1:33am    
This is not a valid question. You need to describe the set of operations and decide if you want to use System.Drawing or WPF -- approached and classes are difference. At least say "I don't care, help to select". But main thing is the set of operations.
--SA

1 solution

What do you want to do with them?
If you are after raw pixel manipulation, then bitmap and unsafe code is the way to go (assuming you can't use native C++). But they can get huge and require substantial quantities of RAM to work fast.

If you want to throw them around the internet, then JPG / PNG / GIF are a lot smaller and can be transferred a lot more quickly. But, they are lossy, and don't give the best picture quality.

There is no "best" performer: it's all down to what you want to do with them.
 
Share this answer
 
Comments
ready to learn 13-Jun-11 15:05pm    
thanks a lot.I think bitmap and unsafe is what I need.I used them to do my project.As I want to do some changes in the picture I can use pointer or arrays.when using the pointer, I dont know how to realize whether the pixel under use exists or not.what's the solution?another question is "will the running time be accessible If I copy the image in an array and do the chanes in the array?"
OriginalGriff 13-Jun-11 15:11pm    
No. If you are using unsafe code and pointers you will probably find it it faster than using an array: no large object creation, less error checking.
If you aren't sure, test it! There is the Stopwatch class which is meant for just that sort of thing...
ready to learn 13-Jun-11 15:41pm    
you helped alot.thank you.but I still dont know how to realize when the pointer refers to the area not belonging to my image.
Sergey Alexandrovich Kryukov 14-Jun-11 1:34am    
All correct, a 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900