Hi
I am getting error on this line - Object variable or with block variable not set
Dim cropRect As RectangularGradient
Dim originalHeight As Long
Dim cropHeight As Long
originalHeight = img.Height
cropHeight = originalHeight * 0.3 ' 30% of the original height
' Set the cropping rectangle (center at the bottom)
Dim cropRect As RectangularGradient
cropRect.Left = 0
cropRect.Right = img.Width