Click here to Skip to main content
15,891,423 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi guys,

I have created one window based application.

Where i'm inserting/fetching images in database.

when i'm displaying image in picturebox, it is showing image in bad resolution.

the image resolution is not so perfect that, as, it is originally.

What I have tried:

i have tried setting image.sizemode to normal, autosize, center, stretch.. tried everything but... still the image resolution is not good.



can anyone plz help me.


Thanks
Posted
Updated 31-May-16 3:53am
Comments
George Jonsson 31-May-16 16:31pm    
Is the image stored as is into the database, or is it scaled down to a smaller size before it is stored?

1 solution

You cannot improve any "resolution". Resolution is the property of a device, such as monitor, printer. Resolution is measured in dots per inch, dots per mm, lines per mm, etc. This is a usual incorrect use of terminology.

You are facing a different problem. It's just the image quality of a bitmap you show on screen is poor, or you make it worse by re-sampling it. For best possible results, you should show the image of exact same size as the size of a bitmap in pixels.

Now, if the source image is not too small and it has reasonable quality, you can successfully re-sample it down (down-scale) to any size, except extremely small sizes; and it will give you reasonably good look. But you cannot considerably enlarge the image. If you do it, you always get poor image quality. The reasons are quite obvious: you simply have no information on the pixels added to the smaller image, so they are obtained via interpolation, which never can be too good.

—SA
 
Share this answer
 
Comments
George Jonsson 31-May-16 16:30pm    
Good explanation. +5
Sergey Alexandrovich Kryukov 31-May-16 21:07pm    
Thank you, George.
—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