Click here to Skip to main content
15,891,748 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one question. I'm a bit lazy today and do not want to provide some comparison of Image encoding capabilities in WPF.
Maybe someone can advice me at which image encoding class i should be looked at in WPF.
The problem consist of next:
i need to provide a image data trasfer across network. Which of encoding classes is more convenient and more suitable for this?
I looked at
PngBitmapEncoder
and
JpegBitmapEncoder


What can you advice to me?
Posted
Updated 30-May-12 6:55am
v2
Comments
Oleksandr Kulchytskyi 30-May-12 7:29am    
As i know, Png image is more smaller than jpeg. Is it right?
db7uk 30-May-12 7:39am    
No not really. PNG is often bigger because it allows layering and transparency that JPGS dont. If you are concerned about image quality I would use the lossless quality properties that PNGS have (meaning that when re-sized the quality is not removed) however you can compress and work with smaller JPGS or GIFS but these do not provide the best quality. depends on your needs for the images.
Oleksandr Kulchytskyi 30-May-12 8:10am    
All this stuff is intended to transfer the image that consist of remote user desktop capture. So as you understand , quality is mandatory requirement.

1 solution

It depends on your situation. However, it seems like your best bet would be to use the JpgBitmapEncoder since you are encoding the image and transferring it across the network. I don't see where you will see an improvement in quality or size by using the PngBitmapEncoder.

Here is a good article on the differences between PNG and JPG that should help in your decision: http://www.turnkeylinux.org/blog/png-vs-jpg[^]
 
Share this answer
 
Comments
Oleksandr Kulchytskyi 30-May-12 11:13am    
Thanks for useful link , it content seems to be very helpful.
I am already using JpegBitmapEncoder, but i had some doubts about that)
Maciej Los 30-May-12 13:55pm    
Good answer, my 5!

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