@@ -215,7 +215,9 @@ def image_to_texture2d(
215215 assert platform_blob is not None
216216 gobs_per_block = TextureSwizzler .get_switch_gobs_per_block (platform_blob )
217217 block_size = TextureSwizzler .TEXTURE_FORMAT_BLOCK_SIZE_MAP [s_tex_format ]
218- width , height = TextureSwizzler .get_padded_texture_size (img .width , img .height , * block_size , gobs_per_block )
218+ width , height = TextureSwizzler .get_padded_texture_size (
219+ img .width , img .height , * block_size , gobs_per_block
220+ )
219221 switch_info = (block_size , gobs_per_block )
220222
221223 if compress_func :
@@ -230,7 +232,9 @@ def image_to_texture2d(
230232
231233 if switch_info :
232234 block_size , gobs_per_block = switch_info
233- enc_img = bytes (TextureSwizzler .swizzle (enc_img , width , height , * block_size , gobs_per_block ))
235+ enc_img = bytes (
236+ TextureSwizzler .swizzle (enc_img , width , height , * block_size , gobs_per_block )
237+ )
234238
235239 return enc_img , tex_format
236240
@@ -286,8 +290,12 @@ def parse_image_data(
286290 assert platform_blob is not None
287291 gobs_per_block = TextureSwizzler .get_switch_gobs_per_block (platform_blob )
288292 block_size = TextureSwizzler .TEXTURE_FORMAT_BLOCK_SIZE_MAP [texture_format ]
289- width , height = TextureSwizzler .get_padded_texture_size (width , height , * block_size , gobs_per_block )
290- image_data = TextureSwizzler .deswizzle (image_data , width , height , * block_size , gobs_per_block )
293+ width , height = TextureSwizzler .get_padded_texture_size (
294+ width , height , * block_size , gobs_per_block
295+ )
296+ image_data = TextureSwizzler .deswizzle (
297+ image_data , width , height , * block_size , gobs_per_block
298+ )
291299 else :
292300 width , height = get_compressed_image_size (width , height , texture_format )
293301
0 commit comments