On a separate note, is there any other option that would approximate the "autolevel" fix performed in Photoshop? I was pointed to SetEqualizeIntensityEffect, but this doesn't really seem to do what I'm looking for. When I use this on a photo that has a green tint, the green becomes much more pronounced after this effect is applied. Decreasing the saturation seems to look closer to what I'm trying to accomplish, but it varies of course with the quality of the original photo. Color isn't important, ie black and white or grayscale will work fine for my purposes. Any help is appreciated.
Code: Select all
'sImagepath = InputBox("Please input the image file path e.g. c:\image1.jpg")
Set ogdpicture = CreateObject("gdpicturepro4.imaging")
ogdpicture.SetLicenseNumber ("XXXX") 'Demo code version
ogdpicture.CreateImageFromFile (simagepath)
ogdpicture.SetContrastEffect (30)
'oGdPicture.SetEqualizeIntensityEffect
ogdpicture.SetSaturationEffect (-100)
ogdpicture.SaveAsPdf ("C::\Users\A.pdf")
ogdpicture.CloseNativeImage
'ogdpicture.CloseImage ("C:\Users\A.jpg")
'MsgBox "Save c:\image.pdf completed"