I want to display thumbnail image in a gridview from file location. How to generate that of .jpeg file?
I am using C# language with asp.net.
I want to display thumbnail image in a gridview from file location. How to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to use
GetThumbnailImagemethod in theImageclass:https://msdn.microsoft.com/en-us/library/8t23aykb%28v=vs.110%29.aspx
Here’s a rough example that takes an image file and makes a thumbnail image from it, then saves it back to disk.
It is in the System.Drawing namespace (in System.Drawing.dll).
Behavior:
Important: the remarks section of the Microsoft link above warns of certain potential problems: