Back to Devexpress

ASPxImageGallery.CustomImageProcessing Event

aspnet-devexpress-dot-web-dot-aspximagegallery-576f287d.md

latest3.1 KB
Original Source

ASPxImageGallery.CustomImageProcessing Event

Enables you to custom process an image, e.g., add a watermark, when ASPxImageGallery is bound to a folder or to binary data.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public event ImageGalleryCustomImageProcessingEventHandler CustomImageProcessing
vb
Public Event CustomImageProcessing As ImageGalleryCustomImageProcessingEventHandler

Event Data

The CustomImageProcessing event's data class is ImageGalleryCustomImageProcessingEventArgs. The following properties provide information specific to this event:

PropertyDescription
GraphicsProvides methods for drawing objects over an image.
ImageProvides access to a Bitmap object that is the processed image.
ImageLocationGets the value specifying the location of the processed image.

Remarks

The CustomImageProcessing event occurs only when the ASPxImageGallery is bound to a folder or to binary data. The event is raised for each image three times (for a thumbnail, a fullscreen viewer image and a fullscreen viewer thumbnail), and enables you to custom process it. For instance, you can handle this event to add a watermark.

The event parameter’s properties allow you to access the processed image (ImageGalleryCustomImageProcessingEventArgs.Image) and to identify the processed image location within the gallery (ImageGalleryCustomImageProcessingEventArgs.ImageLocation). The ImageGalleryCustomImageProcessingEventArgs.Graphics property provides methods for drawing over the image.

See Also

Image Gallery

Online Demo: Image Gallery - Folder Binding

ASPxImageGallery Class

ASPxImageGallery Members

DevExpress.Web Namespace