API Documentation > CorelDRAW > 2025-v26 > StructImportOptions > IVGStructImportOptions
StructImportOptions.ResampleHandler property
Syntax:
Property Get ResampleHandler() As IImportResampleHandler
Property Set ResampleHandler(ByVal Value As IImportResampleHandler)
Remarks:
The ResampleHandler property specifies a handler for resampling on import.
Examples:
The following VBA example creates a new resample-options class. It then imports a JPEG file and resamples it depending on the value for StructImportResampleOptions.CustomData. Before it applies the resampling, the original settings of the image are displayed. To try out this code example, copy the following lines of code into a new class module named cResample:
Option Explicit Implements IImportResampleHandler Private Function IImportResampleHandler_Resample(Options As IStructImportResampleOptions) As Boolean
Dim s As String
s = "Original Settings: " & vbCr
s = s & "DpiX: " & Options.DpiX & vbCr
s = s & "DpiY: " & Options.DpiY & vbCr
s = s & "FileName: " & Options.FileName & vbCr
s = s & "Filter: " & Options.FilterID & vbCr
' Display the original settings in a message box
MsgBox s
' If the custom data is set to 8, then resample half of the original; otherwise 1.5
If Options.CustomData = 8 Then
  Options.Height = Options.Height / 2
  Options.Width = Options.Width / 2
Else
  Options.Height = Options.Height / 1.5
  Options.Width = Options.Width / 1.5
End If End Function