smarnach / pyexiftool

a Python library to communicate with an instance of Phil Harvey's excellent ExifTool command-line application.
Other
270 stars 111 forks source link

How to write yaw,pitch,roll information to an image? #24

Open zhudaoruyi opened 5 years ago

zhudaoruyi commented 5 years ago

I want to write yaw pitch roll of the image ,but don't know how to do,the following can't work

import exiftool

img_name = 'sam.jpg'

with exiftool.ExifTool() as et:
    et.execute("-Yaw=21.123\n-Pitch=10.101\n-Roll=-7.252", img_name)
sylikc commented 2 years ago

that's probably not the way to do it... you need to separate the things out into different parameters.

et.execute("-Yaw=21.123", "Pitch=10.101", "-Roll=-7.252")

Btw, my fork has some fixes https://github.com/sylikc/pyexiftool

deweydb commented 2 years ago

Hi Sylikc, could you please give me the full example? where do you put the filepath? is it as a 4th parameter?

sylikc commented 2 years ago

yes, the image name... i left that off of the command

et.execute("-Yaw=21.123", "-Pitch=10.101", "-Roll=-7.252", img_name)