Name

Image

Synopsis

This abstract class is the base for Bitmap and System.Drawing.Imaging.Metafile. Microsoft’s documentation claims that it is also the base for Icon, but this is not in fact the case in the first release of the framework.

It serves to define a drawing that has its own Page coordinate space, including a Size, HorizontalResolution, and VerticalResolution. It also supports multiframe images, in a variety of different dimensions such as time and resolution, as defined in the System.Drawing.Imaging.FrameDimension class.

Images can be drawn using the Graphics.DrawImage() method.


public abstract class Image : MarshalByRefObject : 

System.Runtime.Serialization.ISerializable, ICloneable, IDisposable {

// Public Instance Properties

   public int Flags{get; }

   public Guid[ ] FrameDimensionsList{get; }

   public int Height{get; }

   public float HorizontalResolution{get; }

   public ColorPalette Palette{set; get; }

   public SizeF PhysicalDimension{get; }

   public PixelFormat PixelFormat{get; }

   public int[ ] PropertyIdList{get; }

   public PropertyItem[ ] PropertyItems{get; }

   public ImageFormat RawFormat{get; }

   public Size Size{get; }

   public float VerticalResolution{get; }

   public int Width{get; }

// Public Static Methods

   public static Image FromFile(string filename);

   public static Image FromFile(string filename, bool useEmbeddedColorManagement);

   public static Bitmap FromHbitmap(IntPtr hbitmap);

   public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette);

   public static Image FromStream(System.IO.Stream ...

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.