We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

EXIF from picture file

Home Forums Puzzles EXIF from picture file

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #69756
    NaxosCG
    Customer

    Hello there,
    Is there any way to read some exif infos from a picture ?

    Here is the context :
    I’d like to let the end user to upload his photo before he can use Verge3D to put the 3D scene into the photo.
    Of course he will have to “find” the right angle / perspective.
    Of course, AR is a better solution, but on computer (not smartphone), it may help, as AR is not present.
    So, the idea is to help him with setting the right Camera focal lengh (plus image pixel size).

    any idea ? Ideally in puzzles, but if i need to copy/paste some script, i can do (i will not understand the code, but i can use it)

    Best regards.

    "1+1=3... for large values of 1"

    #69762

    Hi Claudio,

    Found some libraries that can read EXIF:

    https://github.com/MikeKovarik/exifr
    https://github.com/hMatoba/piexifjs
    https://github.com/exif-js/exif-js

    You can add the corresponding JavaScript file to the application using HTML puzzles
    (you need a script element) and set it src property to reference the JS file.

    Then you can copy and paste their codes into the exec script puzzle.

    Chief 3D Verger | LinkedIn | Twitter

    #69807
    NaxosCG
    Customer

    Thank you, Yuri, i’ll give a try.

    Of course, if i don’t succeed, i’ll ask for some help ;-)

    Regards.

    "1+1=3... for large values of 1"

    #69916
    NaxosCG
    Customer

    Hi Yuri,
    I did not fully succeded :
    – i can find the infos i need (pixel size X & Y, and camera focal lengh in mm, but not with the use of “open file” / ” assign opened file as texture in material”.

    Thing is the exif reading is done on the file read, and the texture assignment is done with the content of the opened file (in data format or something).

    So to make it work (as far as my poor code knowledge can bring me) would be to ask the end user to select twice the picture file : once for reading exif infos, and second for reading the actual pixel datas to change the texture.

    Any help would be nice, or better : one puzzle to read some main exif infos would be great !

    Best regards.

    "1+1=3... for large values of 1"

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.