EXIF

EXIF

Postby Natter » Sun Jul 12, 2020 10:03 am

Hi.

Can I get EXIF metadata from a jpg file ?
Natter
 
Posts: 1199
Joined: Mon May 14, 2007 9:49 am

Re: EXIF

Postby Otto » Wed Mar 17, 2021 7:04 am

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

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXIF

Postby nageswaragunupudi » Wed Mar 17, 2021 8:13 am

https://docs.microsoft.com/en-us/window ... tadata-use

Maybe our GDI+ experts can help in reading meta-data from the images.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10601
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: EXIF

Postby Otto » Wed Mar 17, 2021 8:53 am

Dear Mr. Rao,

Navigating with activeX I get object Htmldocument. Is it possible that we get the content of the Htmldocument.

Best regards,
Otto

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXIF

Postby Natter » Wed Mar 17, 2021 10:41 am

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 ?
Natter
 
Posts: 1199
Joined: Mon May 14, 2007 9:49 am

Re: EXIF

Postby Otto » Wed Mar 17, 2021 3:38 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXIF

Postby Natter » Wed Mar 17, 2021 4:13 pm

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 ?
Natter
 
Posts: 1199
Joined: Mon May 14, 2007 9:49 am

Re: EXIF

Postby TecniSoftware » Wed Mar 17, 2021 8:02 pm

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
Alejandro Cebolido
Buenos Aires, Argentina
User avatar
TecniSoftware
 
Posts: 235
Joined: Fri Oct 28, 2005 6:29 pm
Location: Quilmes, Buenos Aires, Argentina

Re: EXIF

Postby Natter » Thu Mar 18, 2021 5:48 am

Thank you, an interesting utility. However, it is with the installation, which is very inconvenient.
Natter
 
Posts: 1199
Joined: Mon May 14, 2007 9:49 am

Re: EXIF

Postby Otto » Thu Mar 18, 2021 7:39 am

Hello Alejandro,
Thank you for pointing to: https://exiftool.org/ .
I will try the software.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXIF

Postby Otto » Thu Mar 18, 2021 7:45 am

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXIF

Postby Natter » Thu Mar 18, 2021 9:30 am

Don't understand what exactly is not working. Did you get the document object ?

Code: Select all  Expand view
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
Natter
 
Posts: 1199
Joined: Mon May 14, 2007 9:49 am

Re: EXIF

Postby Otto » Thu Mar 18, 2021 1:03 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Re: EXIF

Postby Natter » Thu Mar 18, 2021 2:03 pm

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 ?
Natter
 
Posts: 1199
Joined: Mon May 14, 2007 9:49 am

Re: EXIF

Postby Otto » Thu Mar 18, 2021 3:12 pm

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



Image
>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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6304
Joined: Fri Oct 07, 2005 7:07 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests

cron