Image.GetThumbnailImage : Image « 2D Graphics « C# / C Sharp

C# / C Sharp
1. 2D Graphics
2. Class Interface
3. Collections Data Structure
4. Components
5. Data Types
6. Database ADO.net
7. Design Patterns
8. Development Class
9. Event
10. File Stream
11. Generics
12. GUI Windows Form
13. Language Basics
14. LINQ
15. Network
16. Office
17. Reflection
18. Regular Expressions
19. Security
20. Services Event
21. Thread
22. Web Services
23. Windows
24. XML
25. XML LINQ
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
C# / C Sharp » 2D Graphics » ImageScreenshots 
Image.GetThumbnailImage
 
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

using System.Net;
using System.IO;

public class Form1 : System.Windows.Forms.Form {
    [STAThread]
    static void Main() {
        Application.Run(new Form1());
    }
    protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) {
        string p = "s.JPG";
        Image i = Image.FromFile(p);
        Image tn = i.GetThumbnailImage(5050, null, IntPtr.Zero);  // <=>(IntPtr)0
        e.Graphics.DrawImage(tn, 1000, tn.Width, tn.Height);

        e.Graphics.Dispose();
    }
}

 
Related examples in the same category
1. Load Image from an image file with Exception handler
2. Image.FromStream: load image from stream
3. Shrink ImageShrink Image
4. Shear ImageShear Image
5. Clone ImageClone Image
6. Get Image Resolution and Image size and Display sizeGet Image Resolution and Image size and Display size
7. Draw image based on its sizeDraw image based on its size
8. Set image resolution and paint itSet image resolution and paint it
9. Load image and displayLoad image and display
10. Fill Ellipse with image based Texture BrushFill Ellipse with image based Texture Brush
11. Image Save
12. Image Open
13. Thumbnail Image
14. Draw on Pixel-Size Image
15. Draw text on an Image
16. Partial Image Rotate
17. Partial Image Stretch
18. Draw Partial Image
19. Image At Points (Draw part of the image)
20. Image Reflection
21. Image Scale Isotropic
22. Image Scale To Rectangle
23. Center Pixel-Size Image by using Image.Width and Image.Height
24. Center an Image (VerticalResolution, HorizontalResolution)
25. Load image from a URL(Web) and draw it
26. Scribble with Bitmap
27. Image Flipping and Rotating
28. Image Zoom
w_w__w___.__j_a___va___2s.__c__om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.