Ticket #2028: dpi.diff
File dpi.diff, 4.5 KB (added by , 18 years ago) |
---|
-
mythburn/scripts/mythburn.py
64 64 65 65 dvdPAL=(720,576) 66 66 dvdNTSC=(720,480) 67 dvdPALdpi=(75,80) 68 dvdNTSCdpi=(81,72) 67 69 68 70 dvdPALHalfD1="352x576" 69 71 dvdNTSCHalfD1="352x480" … … 1990 1992 node.setAttribute("y1","%d" % int(boundarybox[3] + 1)) 1991 1993 spunode.appendChild(node) 1992 1994 1993 def createMenu(screensize, numberofitems):1995 def createMenu(screensize, screendpi, numberofitems): 1994 1996 """Creates all the necessary menu images and files for the MythBurn menus.""" 1995 1997 1996 1998 #Get the main menu node (we must only have 1) … … 2073 2075 itemnum+=1 2074 2076 2075 2077 #Save this menu image and its mask 2076 bgimage.save(os.path.join(getTempPath(),"background-%s.png" % page),"PNG",quality=99,optimize=0 )2077 bgimagemask.save(os.path.join(getTempPath(),"backgroundmask-%s.png" % page),"PNG",quality=99,optimize=0 )2078 bgimage.save(os.path.join(getTempPath(),"background-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) 2079 bgimagemask.save(os.path.join(getTempPath(),"backgroundmask-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) 2078 2080 2079 2081 ## Experimental! 2080 2082 ## for i in range(1,750): … … 2109 2111 #Move on to the next page 2110 2112 page+=1 2111 2113 2112 def createChapterMenu(screensize, numberofitems):2114 def createChapterMenu(screensize, screendpi, numberofitems): 2113 2115 """Creates all the necessary menu images and files for the MythBurn menus.""" 2114 2116 2115 2117 #Get the main menu node (we must only have 1) … … 2188 2190 999, chapter, chapterlist) 2189 2191 2190 2192 #Save this menu image and its mask 2191 bgimage.save(os.path.join(getTempPath(),"chaptermenu-%s.png" % page),"PNG",quality=99,optimize=0 )2193 bgimage.save(os.path.join(getTempPath(),"chaptermenu-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) 2192 2194 2193 bgimagemask.save(os.path.join(getTempPath(),"chaptermenumask-%s.png" % page),"PNG",quality=99,optimize=0 )2195 bgimagemask.save(os.path.join(getTempPath(),"chaptermenumask-%s.png" % page),"PNG",quality=99,optimize=0,dpi=screendpi) 2194 2196 2195 2197 spumuxdom.documentElement.firstChild.firstChild.setAttribute("select",os.path.join(getTempPath(),"chaptermenumask-%s.png" % page)) 2196 2198 spumuxdom.documentElement.firstChild.firstChild.setAttribute("highlight",os.path.join(getTempPath(),"chaptermenumask-%s.png" % page)) … … 2221 2223 #Move on to the next page 2222 2224 page+=1 2223 2225 2224 def createDetailsPage(screensize, numberofitems):2226 def createDetailsPage(screensize, screendpi, numberofitems): 2225 2227 """Creates all the necessary images and files for the details page.""" 2226 2228 2227 2229 write( "Creating details pages") … … 2270 2272 "", spumuxdom, spunode, numberofitems, 0, "") 2271 2273 2272 2274 #Save this details image 2273 bgimage.save(os.path.join(getTempPath(),"details-%s.png" % itemnum),"PNG",quality=99,optimize=0 )2275 bgimage.save(os.path.join(getTempPath(),"details-%s.png" % itemnum),"PNG",quality=99,optimize=0,dpi=screendpi) 2274 2276 2275 2277 #Release large amounts of memory ASAP ! 2276 2278 del draw … … 2832 2834 2833 2835 if videomode=="ntsc": 2834 2836 format=dvdNTSC 2837 dpi=dvdNTSCdpi 2835 2838 elif videomode=="pal": 2836 2839 format=dvdPAL 2840 dpi=dvdPALdpi 2837 2841 else: 2838 2842 fatalError("Unknown videomode is set (%s)" % videomode) 2839 2843 … … 2901 2905 #for the chapter marks and thumbnails. 2902 2906 #create the DVD menus... 2903 2907 if wantMainMenu: 2904 createMenu(format, files.length)2908 createMenu(format, dpi, files.length) 2905 2909 2906 2910 #Submenus are visible when you select the chapter menu while the recording is playing 2907 2911 if wantChapterMenu: 2908 createChapterMenu(format, files.length)2912 createChapterMenu(format, dpi, files.length) 2909 2913 2910 2914 #Details Page are displayed just before playing each recording 2911 2915 if wantDetailsPage: 2912 createDetailsPage(format, files.length)2916 createDetailsPage(format, dpi, files.length) 2913 2917 2914 2918 #DVD Author file 2915 2919 if not wantMainMenu and not wantChapterMenu: … … 3125 3129 traceback.print_exc(file=sys.stdout) 3126 3130 if progresslog != "": 3127 3131 traceback.print_exc(file=progressfile) 3128 write('-'*60) 3129 No newline at end of file 3132 write('-'*60)