DjVu Namespace : AddPageNotificationHandler Delegate |
The image passed to Encoder.AddPage/Encoder.AddPages method call.
Public Delegate Function AddPageNotificationHandler( _ ByVal current As Integer, _ ByVal max As Integer, _ ByVal img As Image _ ) As Boolean
Dim instance As New AddPageNotificationHandler(AddressOf HandlerMethod)
The image passed to Encoder.AddPage/Encoder.AddPages method call.
Sample to skip large images |
Copy Code |
---|---|
Encoder enc = new Encoder(); enc.AddPageNotification += (current, max, image) => { if (image.Width > 6000 || image.Height > 6000) return false; // The image is too large, we will skip this return true; }; // TIFF file may contain several pages enc.AddPages("image.tif"); |
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family