@@ -108,7 +108,6 @@ def prepare_frames(self):
108108 offset = extract_name (frame ).replace ("-" , ":" ).split ("." )[0 ]
109109 progress .update ("Processing [bold]%s[/bold] frame" % offset )
110110 with Image .open (frame ) as image :
111- image = image .resize ((self .width , self .height ), Image .ANTIALIAS )
112111 master .paste (image , (x , y ))
113112
114113 with Progress ("Saving the result at '%s'" % master_path ):
@@ -158,17 +157,15 @@ def generate(self):
158157 with Progress ("Saving thumbnail metadata at '%s'" % self .metadata_path ):
159158 for frame , start , * _ in self .thumbnails ():
160159 frame = os .path .join (self .thumbnail_dir , os .path .basename (frame ))
161- with Image .open (frame ) as image :
162- image .resize ((self .width , self .height ), Image .ANTIALIAS ).save (frame )
163- base = os .path .join (self .base , os .path .basename (self .thumbnail_dir ))
164- prefix = base if self .base else os .path .relpath (self .thumbnail_dir )
165- route = os .path .join (prefix , os .path .basename (frame ))
166- route = pathlib .Path (route ).as_posix ()
167- thumbnail_data = {
168- "src" : route ,
169- "width" : "%spx" % self .width ,
170- }
171- metadata [int (start )] = thumbnail_data
160+ base = os .path .join (self .base , os .path .basename (self .thumbnail_dir ))
161+ prefix = base if self .base else os .path .relpath (self .thumbnail_dir )
162+ route = os .path .join (prefix , os .path .basename (frame ))
163+ route = pathlib .Path (route ).as_posix ()
164+ thumbnail_data = {
165+ "src" : route ,
166+ "width" : "%spx" % self .width ,
167+ }
168+ metadata [int (start )] = thumbnail_data
172169
173170 with open (self .metadata_path , "w" ) as fp :
174171 json .dump (metadata , fp , indent = 2 )
0 commit comments