Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 783527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:33:44+00:00 2026-05-14T20:33:44+00:00

I want to display thumbnail image in a gridview from file location. How to

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:33:45+00:00Added an answer on May 14, 2026 at 8:33 pm

    You have to use GetThumbnailImage method in the Image class:

    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.

    Image image = Image.FromFile(fileName);
    Image thumb = image.GetThumbnailImage(120, 120, ()=>false, IntPtr.Zero);
    thumb.Save(Path.ChangeExtension(fileName, "thumb"));
    

    It is in the System.Drawing namespace (in System.Drawing.dll).

    Behavior:

    If the Image contains an embedded thumbnail image, this method
    retrieves the embedded thumbnail and scales it to the requested size.
    If the Image does not contain an embedded thumbnail image, this method
    creates a thumbnail image by scaling the main image.


    Important: the remarks section of the Microsoft link above warns of certain potential problems:

    The GetThumbnailImage method works well when the requested thumbnail
    image has a size of about 120 x 120 pixels. If you request a large
    thumbnail image (for example, 300 x 300) from an Image that has an
    embedded thumbnail, there could be a noticeable loss of quality in the
    thumbnail image
    .

    It might be better to scale the main image (instead
    of scaling the embedded thumbnail) by calling the DrawImage method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code: http://jsfiddle.net/J6vzU/1/ I want to dynamically display thumbnail of uploaded file
I want to get the thumbnail from the jpg file and display as a
I have some Thumbnail images .I want to display image thumbnails in a Panorama(or
I want to display a thumbnail image in a cell of tableViewController , this
I want to display full screen of a image when i click on thumbnail
I want display data from database in Listbox...Here is my code, It is not
i want display 1 record from colums zodys , I'm programint in C# I
I want to display a file tree similarly to java2s.com 'Create a lazy file
I'm using ASP.NET 3.5 to build a website. One area of the website shows
I want to show a big Image when I press the small thumbnail. A

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.