Hi Olivier, On 2010-12-03, Ponchaut Olivier <[email protected]> wrote: > Hi Olivier, > > The actual videoporama source code is compliant with both version 0.1.3 > and 0.2.x of pyexiv2. I check this because It wasn't my code, so as it > was working fine, I didn't look at it.
Yes, I had had a quick look at this already, and it seemed that it should work fine with both APIs. But it’s not in an official release yet. Has the functionality been tested with pyexiv2 0.2.x to make sure it runs equally well as it did with 0.1.x ? > The author of this part was aware of the two differents versions and > syntax, so he made some check to choose the good syntax in function of > available pyexiv2 version. > > Here's the portion of code : > > # Obtain the exif data > def LoadEXIF(self) : > > #---------------------------------------------------------------------------- > > # There's two different versions of pyexiv2 with different syntaxe ! > > #---------------------------------------------------------------------------- > > EXIF_Orientation=-1 > try: > exif = pyexiv2.ImageMetadata(unicode(self.urlim)) > except : > try: > exif = pyexiv2.Image(unicode(self.urlim)) > except: > return > > try: > exif.read() > except : > try: > exif.readMetadata() > except: > return > > # Image rotation (EXIF) > try: > EXIF_Orientation=exif['Exif.Image.Orientation'] > try: EXIF_Orientation=exif['Exif.Image.Orientation'].value > except: None > except: > EXIF_Orientation=1 > > ... > > I guess it could be simpler to find the pyexiv2 version instead of try > ... except but it works. Yes, that could be cleaned up to be made more readable and maintainable (see for example Damon’s code at http://bazaar.launchpad.net/~dlynch3/rapid/trunk/annotate/head:/rapid/metadata.py), but essentially it works. > So I just have to publish the next release of Videoporama before next > Ubuntu. That would be awesome. Alternatively, if releasing the new version doesn’t fit your schedule, we could still patch the ubuntu package for the current version with the revision that adds support for pyexiv2 0.2. Cheers, Olivier _______________________________________________ Mailing list: https://launchpad.net/~pyexiv2-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~pyexiv2-developers More help : https://help.launchpad.net/ListHelp

