Closed fdncred closed 5 years ago
Good idea!
Are you sure leptonica knows the same path? Debug pix is external. Maybe there's a function to set the path
I don't understand your question. The function PathFindOnPath looks on windows system for any file name you pass in that exists in the path environment variable. I'm not sure what leptonica or debug pix means in this context.
Set setLeptDebugOK should be possible if i_view exists or not (because leptonica writes files too) for displaying the pix Leptonica needs to know the path. The Path in my Wrapper is irrelevant for Leptonica if i can not transmit and set the path. i will take a look if its possible to set the i_view path.
I agree that setLeptDebugOK isn't dependent on i_view.exe existing, however that is what you coded. So, I just changed your code so that I could run my program.
You really just want to know if the user has i_view.exe and warn them that some viewing functionality may not work if i_view.exe isn't present. It really has nothing to do with setleptdebugok, but again, that's where you put the code so that's where I changed it.
OK, changed.
modified i little bit to work for me too and replaced my bad throw event idea with a exclamation msgbox.
Dim retStr = If(Natives.PathFindOnPath(sb, {Environment.CurrentDirectory}) = True, sb.ToString(), Nothing)
This code allows you to have irfanview somewhere in your path instead of requiring it in a certain folder.
Supporting code