High-level version of transcode_handle(). Calls transcode_handle() internally. Returns: (data_bytes, tfmt, block_width, block_height)
(
self,
ktx2_bytes: bytes,
family: str,
level=0,
layer=0,
face=0,
decode_flags=0,
channel0=-1,
channel1=-1
)
| 699 | # levels/faces/layers.) |
| 700 | # ----------------------------------------------------------------------- |
| 701 | def transcode( |
| 702 | self, |
| 703 | ktx2_bytes: bytes, |
| 704 | family: str, |
| 705 | level=0, |
| 706 | layer=0, |
| 707 | face=0, |
| 708 | decode_flags=0, |
| 709 | channel0=-1, |
| 710 | channel1=-1 |
| 711 | ): |
| 712 | """ |
| 713 | High-level version of transcode_handle(). |
| 714 | Calls transcode_handle() internally. |
| 715 | |
| 716 | Returns: |
| 717 | (data_bytes, tfmt, block_width, block_height) |
| 718 | """ |
| 719 | ktx2_handle = self.open(ktx2_bytes) |
| 720 | try: |
| 721 | return self.transcode_handle( |
| 722 | ktx2_handle, |
| 723 | family, |
| 724 | level=level, |
| 725 | layer=layer, |
| 726 | face=face, |
| 727 | decode_flags=decode_flags, |
| 728 | channel0=channel0, |
| 729 | channel1=channel1 |
| 730 | ) |
| 731 | finally: |
| 732 | self.close(ktx2_handle) |
| 733 | |
| 734 | def tfmt_name(self, tfmt: int): |
| 735 | return TranscoderTextureFormat(tfmt).name |
nothing calls this directly
no test coverage detected