Page 1 of 2
EXIF
Posted: Sun Jul 12, 2020 10:03 am
by Natter
Hi.
Can I get EXIF metadata from a jpg file ?
Re: EXIF
Posted: Wed Mar 17, 2021 7:04 am
by Otto
Hello Natter,
Have you found a solution yet? If so, can you please post some source code?
After I couldn't find a quick solution with Fivewin, I tried Javascript. There are ready-made libraries (exif-js) here.
Then I tried to call up the webpage with ActiveX. But now I'm stuck.
I haven't found out whether you can read the document object. Can I exchange data between ActiveX and Fivewin
without going through the hard drive?
Best regards,
Otto
https://www.modharbour.club/exif-js-master/example/index.html
Re: EXIF
Posted: Wed Mar 17, 2021 8:13 am
by nageswaragunupudi
https://docs.microsoft.com/en-us/window ... tadata-useMaybe our GDI+ experts can help in reading meta-data from the images.
Re: EXIF
Posted: Wed Mar 17, 2021 8:53 am
by Otto
Dear Mr. Rao,
Navigating with activeX I get object Htmldocument. Is it possible that we get the content of the Htmldocument.
Best regards,
Otto

Re: EXIF
Posted: Wed Mar 17, 2021 10:41 am
by Natter
Otto, if you got a document from Active X, then work with it through the DOM
PS. And what is the relationship between EXIF and ActiveX ?
Re: EXIF
Posted: Wed Mar 17, 2021 3:38 pm
by Otto
Hello Natter,
Thank you. Do you have some code on how to address the DOM object?
The relationship between ActiveX and Exif is that I do not know how to get the information stored in Exif with Fivewin.
But I have a javascript lib that does all I want.
Now it would be great if we could read the DOM object with all the information.
Best regards,
Otto
https://winhotel.space/exif-js-master/example/index.html
Re: EXIF
Posted: Wed Mar 17, 2021 4:13 pm
by Natter
If under FW:
oDk:=oActX:GetProp("Document")
? oDk:getElementsByClassName("MyClass")
or other DOM commands (depending on the task)
Are you going to use the JS library ?
Re: EXIF
Posted: Wed Mar 17, 2021 8:02 pm
by TecniSoftware
Natter wrote:Hi.
Can I get EXIF metadata from a jpg file ?
Hello!
There is this free comnand line tool EXIFTOOL, take a look in
https://exiftool.org/Greetings
Re: EXIF
Posted: Thu Mar 18, 2021 5:48 am
by Natter
Thank you, an interesting utility. However, it is with the installation, which is very inconvenient.
Re: EXIF
Posted: Thu Mar 18, 2021 7:39 am
by Otto
Hello Alejandro,
Thank you for pointing to:
https://exiftool.org/ .
I will try the software.
Best regards,
Otto
Re: EXIF
Posted: Thu Mar 18, 2021 7:45 am
by Otto
Good morning Natter,
I tried what you suggested but I can't find out the syntax for method and data how to access the object.
oHttp := oActiveX:GetProp( "Document" ) // -> Object Document
cClassName := oHttp:cClassname
? cClassName:innerHTML / Not working
Can you please help with some more code.
If we can access oHttp from Fivewin, we can use the "DIALOGs" from mod harbour and embed with ActiveX into Fivewin.
Best regards,
Otto
Re: EXIF
Posted: Thu Mar 18, 2021 9:30 am
by Natter
Don't understand what exactly is not working. Did you get the document object ?
Code: Select all | Expand
if oDk:URL=MyUrl
do while .T.
if valtype(oDk:body)!="U".and.oDk:body:ReadyState-"complete"
buf:=oDk:DocumentElement:InnerHTML
exit
endif
multisec(50)
sysrefresh()
enddo
endif
Re: EXIF
Posted: Thu Mar 18, 2021 1:03 pm
by Otto
Hello Natter,
Many thanks. It works now, technically.
But I think exif.js is not supported by Internet Explorer.
Do you know whether you can set Firefox or Chrome to be opened?
Best regards,
Otto
Re: EXIF
Posted: Thu Mar 18, 2021 2:03 pm
by Natter
You think exif.js does not work under IE or you are sure of it.
Can make an HTML file where the library is connected exif.js
Run it from the ActiveX object.
Do page processing.
You can try to open another browser (shellexecute), and the parameter to it is an HTML file
Where to put the received data ?
Re: EXIF
Posted: Thu Mar 18, 2021 3:12 pm
by Otto
Hello Natter,
Thank you.
>You think exif.js does not work under IE or you are sure of it.
Yes, I tried with Internet Explorer and js is not executed.
https://winhotel.space/exif-js-master/e ... index.html
>Can make an HTML file where the library is connected exif.js
Run it from the ActiveX object.
Do page processing.
You can try to open another browser (shellexecute), and the parameter to it is an HTML file
shellexecute(,"open","chrome.exe","https://winhotel.space/exif-js-master/example/index.html")
This is working fine but not with acticeX.
I found this now:
https://stackoverflow.com/questions/353 ... -on-chrome>Where to put the received data ?
I store the data (buf) with memowrit().
Best regards,
Otto