@@ -215,7 +215,9 @@ def image_to_texture2d(
215
215
assert platform_blob is not None
216
216
gobs_per_block = TextureSwizzler .get_switch_gobs_per_block (platform_blob )
217
217
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
+ )
219
221
switch_info = (block_size , gobs_per_block )
220
222
221
223
if compress_func :
@@ -230,7 +232,9 @@ def image_to_texture2d(
230
232
231
233
if switch_info :
232
234
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
+ )
234
238
235
239
return enc_img , tex_format
236
240
@@ -286,8 +290,12 @@ def parse_image_data(
286
290
assert platform_blob is not None
287
291
gobs_per_block = TextureSwizzler .get_switch_gobs_per_block (platform_blob )
288
292
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
+ )
291
299
else :
292
300
width , height = get_compressed_image_size (width , height , texture_format )
293
301
0 commit comments