I am wanting to compare different quality/compression levels of images however the ADRGetLastConfidence always returns the same value: 40. regardless of whether I compare the original image to a high quality format or a low quality format. You can visually see the difference in images attached.
I have based the code on this example - viewtopic.php?t=1450#4728
Code: Select all
Dim oGdPictureImaging As New GdPicture.GdPictureImaging
Dim Confidence As Double
oGdPictureImaging.SetLicenseNumber("XXXX") 'Replace with your own license key
Dim ImageID1 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("orig.jpg")
Dim ImageID2 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("low.jpg") 'comment to test high quality image
'Dim ImageID2 As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("high.jpg") 'uncomment to test high quality image
Dim TemplateID As Integer = oGdPictureImaging.ADRCreateTemplateFromGdPictureImage(ImageID1)
oGdPictureImaging.ReleaseGdPictureImage(ImageID1)
oGdPictureImaging.ADRGetCloserTemplateForGdPictureImage(ImageID2)
oGdPictureImaging.ReleaseGdPictureImage(ImageID2)
Confidence = oGdPictureImaging.ADRGetLastConfidence()
oGdPictureImaging.ADRDeleteTemplate(TemplateID)
MsgBox("The two image are the same at: " & Str(Confidence) & "%")
2) Why is the confidence level not changing when I compare different compressed files?
Hope you can help!