wackywoo105
Registered User.
- Local time
- Today, 00:00
- Joined
- Mar 14, 2014
- Messages
- 203
I'm loading some images into access image process. They are signatures on a pure white background. I want to remove the excess white area around the signature so it is cropped to just the size of the signature.
Is there a way to do this with VBA? If not are there any utilities that can be run from command line that would work?
Is there a way to do this with VBA? If not are there any utilities that can be run from command line that would work?
Code:
Dim wiaImg As New WIA.ImageFile
Dim IP As ImageProcess
wiaImg.LoadFile SiganutureToUse
Set IP = CreateObject("WIA.ImageProcess")
IP.Filters.Add (IP.FilterInfos("Convert").FilterID)
IP.Filters(1).Properties("FormatID").Value = WIA.FormatID.wiaFormatJPEG
IP.Filters(1).Properties("Quality").Value = 25
Set wiaImg = IP.Apply(wiaImg)
wiaImg.SaveFile sigfile