Click here to Skip to main content
16,004,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

How to change the image resolution in vb.net (Windows Application).

Thanks and Regards,
Sivasankaran G
Posted
Updated 7-Aug-20 5:11am
v3

This is called image resampling. Please see also my comment to the answer by Abhinav.
One good .NET solution could be found here:
http://stackoverflow.com/questions/249587/high-quality-image-scaling-c-sharp[^].

[EDIT]

In response to OP's request for additional explanation.

I don't know what else to explain as it should be clear from the discussion I've referenced. Perhaps you need to understand better the concept of resampling. The please see:
http://en.wikipedia.org/wiki/Resampling_%28bitmap%29[^].

—SA
 
Share this answer
 
v2
Comments
Gssankar 5-Jul-12 0:50am    
Hi Sergey Alexandrovich,

I am confused. can u explain in brief
Sergey Alexandrovich Kryukov 5-Jul-12 2:09am    
I'm not sure what else to explain. Perhaps you can ask about something you are confused about.
Please see my update, after [EDIT].
--SA
Abhinav S 5-Jul-12 1:43am    
My 5. IMO though, this would be little complex for the OP.
Sergey Alexandrovich Kryukov 5-Jul-12 2:08am    
Thank you; you are probably right as OP asked for additional explanation.
--SA
Have a look at the TransformedBitmap class[^].
This would allow you to change the size of your image.

Changing the image resolution is not that easy. Scaling an image will make an image look bigger - but there will be changes in the way it appears. It will appear softer. Cropping and Scaling Images[^] should help you with scaling.

Scaling is based on one of various alogrithms that you could apply.
 
Share this answer
 
Comments
Gssankar 4-Jul-12 22:29pm    
Hi Abhinav,

Thanks for your response. i will try.

Thanks and Regards,
Sivasankaran G
Gssankar 4-Jul-12 22:30pm    
hi,

Is this possible to change the resolution in vb.net windows application.
Abhinav S 4-Jul-12 23:26pm    
You could, but you would need to write some complex code.
Sergey Alexandrovich Kryukov 5-Jul-12 0:24am    
Complex? Well, it depends what one uses. I added my answer with a link to one solution, please see.
--SA
Sergey Alexandrovich Kryukov 5-Jul-12 0:17am    
You are talking not about resolution, but about the size of the image in pixels.
The resolution is something like number of pixels per inch or per mm. It is stored in some images and is not very significant; for example, it can be considered as metadata used in such things as printing with options "use original resolution". What OP asks is called re-sampling. And it is available in .NET.
--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