Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version
Go to top

Webpage thumbnailer

, 17 Aug 2006
An article on how to get a webpage thumbnail and give your favorite links a face.
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace net.grool.util
{
	public delegate void RefreshPictureDelegate(Image im);
	public class PicDoc
	{
		public event RefreshPictureDelegate refreshPicture;
		string url = string.Empty;

		public string Url
		{
			get { return url; }
			set { url = value; }
		}
		PSize picSize = null;
		Image im = null;


		public Image Image
		{
			get { return im; }
			set
			{
				im = value;
				refreshPicture(im);
			}
		}
		public PSize PicSize
		{
			get { return picSize; }
			set { picSize = value; }
		}
		public Image getSizedImage(Image im)
		{
			return new Bitmap(im, picSize.getBaseSize);
		}

	}

	public class PSize
	{
		Size pSize;

		public Size getBaseSize
		{
			get { return pSize; }
			set { pSize = value; }
		}

		public int Width
		{
			get { return pSize.Width; }
			set { pSize.Width = value; }
		}
		public int Height
		{
			get { return pSize.Height; }
			set { pSize.Height = value; }
		}
		public PSize(int width, int height)
		{
			pSize.Width = width;
			pSize.Height = height;

		}
		public override string ToString()
		{
			return string.Format("{0}X{1}", pSize.Width, pSize.Height);
		}

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

dooskoobi
Web Developer
Belgium Belgium
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140905.1 | Last Updated 17 Aug 2006
Article Copyright 2006 by dooskoobi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid