Click here to Skip to main content
15,867,834 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi,

how can i improve image clarity.I am loading image from BitmapSoure.
C++
BitmapSource imgSource = Resources.Logo;
drawingContext.DrawImage(imgSource,new Rect(Sizes.Gutter + 10,Sizes.Margin + 10,100,30));

Regards,
sajith
Posted
Updated 29-Jan-12 2:38am
v2
Comments
Amir Mahfoozi 29-Jan-12 8:39am    
What do you mean by saying image clarity ?

All you can do is to get a source image of better quality. Yes, seriously.

Moreover, if this is the photograph, there is nothing better than taking the image of good clarity right in camera. The effectiveness of all those image improvements in post production is highly exaggerated. Only cropping can be nearly perfect.

Your WPF code does not degrade the quality, but you hardly can improve it. If you mean some sophisticated and automated image processing, such as sharpening, I would not recommend doing it.

If you really want to improve images in post-processing, always do it manually using something like Photoshop or other similar software, and only if you are a pretty good master of re-touch. Open-Source GIMP (http://en.wikipedia.org/wiki/GIMP[^], http://www.gimp.org/[^]) is also a very good thing, in some special aspects even better.

—SA
 
Share this answer
 
Comments
sajithnet 30-Jan-12 22:31pm    
many thanks,SA
All iam doing is creating the Logo for XPS report.The logo is not showing in original format.


Bitmap bitmap = Resources.Logo;

drawingContext.DrawImage(bitmap,new Rect(Sizes.Gutter + 10,Sizes.Margin + 10,50,30));
What SA said is not entirely correct. I am not sure why you're drawing it the way you are, instead of just setting the BitmapSource of a control that shows images, but, if your control is a different size to the original image, then drawing to a different aspect ratio can degrade your image.

This[^] is how you set the resizing mode in WPF when drawing an image, you might have to change how you show it to take advantage of that.
 
Share this answer
 

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