Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def get_dvd_dims(ar, dvd_format):
    storage_width = 720
    if dvd_format.lower() == 'ntsc':
        storage_height = 480
        if ar == 16/9:
            display_width = 854
            display_height = 480
        elif ar == 4/3:
            display_width = 720
            display_height = 540
        else:
            raise
    elif dvd_format.lower() == 'pal':
        storage_height = 576
        display_height = 576
        if ar == 16/9:
            display_width = 1024
        elif ar == 4/3:
            display_width = 768
        else:
            raise
    dims = { 'storage_width':  storage_width,
             'storage_height': storage_height,
             'display_width':  display_width,
             'display_height': display_height }
    return dims
        


src/i/z/izdvd-0.1.2/izdvd/menu.py   izdvd(Download)
    def get_dims(self):
        if self.menu_ar and self.dvd_format:
            dims = utils.get_dvd_dims(self.menu_ar, self.dvd_format)
            self.storage_width = dims['storage_width']
            self.storage_height = dims['storage_height']