Share via


WebImage Class

Represents an object that lets you display and manage images in a web page.

Inheritance Hierarchy

System.Object
  System.Web.Helpers.WebImage

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Class WebImage
'Usage
Dim instance As WebImage
public class WebImage
public ref class WebImage
type WebImage =  class end
public class WebImage

The WebImage type exposes the following members.

Constructors

  Name Description
Public method WebImage(Byte[]) Initializes a new instance of the WebImage class using a byte array to represent the image.
Public method WebImage(Stream) Initializes a new instance of the WebImage class using a stream to represent the image.
Public method WebImage(String) Initializes a new instance of the WebImage class using a path to represent the image location.

Top

Properties

  Name Description
Public property FileName Gets or sets the file name of the WebImage object.
Public property Height Gets the height, in pixels, of the image.
Public property ImageFormat Gets the format of the image (for example, "jpeg" or "png").
Public property Width Gets the width, in pixels, of the image.

Top

Methods

  Name Description
Public method AddImageWatermark(String, Int32, Int32, String, String, Int32, Int32) Adds a watermark image using a path to the watermark image.
Public method AddImageWatermark(WebImage, Int32, Int32, String, String, Int32, Int32) Adds a watermark image using the specified image object.
Public method AddTextWatermark Adds watermark text to the image.
Public method Clone Copies the WebImage object.
Public method Crop Crops an image.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method FlipHorizontal Flips an image horizontally.
Public method FlipVertical Flips an image vertically.
Public method GetBytes Returns the image as a byte array.
Public method GetHashCode (Inherited from Object.)
Public methodStatic member GetImageFromRequest Returns an image that has been uploaded using the browser.
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method Resize Resizes an image.
Public method RotateLeft Rotates an image to the left.
Public method RotateRight Rotates an image to the right.
Public method Save Saves the image using the specified file name.
Public method ToString (Inherited from Object.)
Public method Write Renders an image to the browser.

Top

Remarks

This class represents a helper, which is a component that simplifies web programming in ASP.NET Web Pages. You can use the WebImage class to display and manage images in a web page.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Helpers Namespace