Files
sirh/venv/lib/python3.12/site-packages/PIL/__pycache__/FtexImagePlugin.cpython-312.pyc

78 lines
5.2 KiB
Plaintext
Raw Normal View History

2026-04-29 11:52:03 +02:00
<EFBFBD>
<00><><EFBFBD>i<EFBFBD> <00><01>
<00>dZddlmZddlZddlmZddlmZddlm Z m
Z
dZ Gd <09>d
e<05>Z Gd <0B>d e
j<00>Z dd <0A>Ze je j e e<0E>e j"e j ddg<02>y)a 
A Pillow loader for .ftc and .ftu files (FTEX)
Jerome Leclanche <jerome@leclan.ch>
The contents of this file are hereby released in the public domain (CC0)
Full text of the CC0 license:
https://creativecommons.org/publicdomain/zero/1.0/
Independence War 2: Edge Of Chaos - Texture File Format - 16 October 2001
The textures used for 3D objects in Independence War 2: Edge Of Chaos are in a
packed custom format called FTEX. This file format uses file extensions FTC
and FTU.
* FTC files are compressed textures (using standard texture compression).
* FTU files are not compressed.
Texture File Format
The FTC and FTU texture files both use the same format. This
has the following structure:
{header}
{format_directory}
{data}
Where:
{header} = {
u32:magic,
u32:version,
u32:width,
u32:height,
u32:mipmap_count,
u32:format_count
}
* The "magic" number is "FTEX".
* "width" and "height" are the dimensions of the texture.
* "mipmap_count" is the number of mipmaps in the texture.
* "format_count" is the number of texture formats (different versions of the
same texture) in this file.
{format_directory} = format_count * { u32:format, u32:where }
The format value is 0 for DXT1 compressed textures and 1 for 24-bit RGB
uncompressed textures.
The texture data for a format starts at the position "where" in the file.
Each set of texture data in the file has the following structure:
{data} = format_count * { u32:mipmap_size, mipmap_size * { u8 } }
* "mipmap_size" is the number of bytes in that mip level. For compressed
textures this is the size of the texture data compressed with DXT1. For 24 bit
uncompressed textures, this is 3 * width * height. Following this are the image
bytes for that mipmap level.
Note: All data is stored in little-Endian (Intel) byte order.
<EFBFBD>)<01> annotationsN)<01>IntEnum)<01>BytesIO<49>)<02>Image<67> ImageFilesFTEXc<01><00>eZdZdZdZy)<04>FormatrrN)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>DXT1<54> UNCOMPRESSED<45><00><00>P/home/fatima/modif/sirh/venv/lib/python3.12/site-packages/PIL/FtexImagePlugin.pyr
r
As <00><00> <0C>D<EFBFBD><14>Lrr
c<01>$<00>eZdZdZdZdd<03>Zdd<04>Zy)<08> FtexImageFile<6C>FTEXzTexture File Format (IW2:EOC)c<01><><00>|j<00>J<00>t|jjd<01><00>s d}t|<01><00>t j
d|jjd<01><00>t j
d|jjd<05><00>|_t j
d|jjd<05><00>\}}|dk(sJ<00>t j
d|jjd<05><00>\}}|jj|<05>t j
d|jjd<01><00>\}|jj|<06>}|tjk(r3d|_
tjdd |jzd
d <0B>g|_n_|tjk(r3d |_
tjd d |jzd
d <0C>g|_ndt!|<04><00><00>}t#|<01><00>|jj%<00>t'|<07>|_y)N<>znot an FTEX filez<iz<2i<32>r<00>RGBA<42>bcn)rrr)r<00>RGB<47>rawz$Invalid texture compression format: )<14>fp<66>_accept<70>read<61> SyntaxError<6F>struct<63>unpack<63>_size<7A>seekr
r<00>_moder<00>_Tile<6C>size<7A>tiler<00>repr<70>
ValueError<EFBFBD>closer)<08>self<6C>msg<73> mipmap_count<6E> format_count<6E>format<61>where<72> mipmap_size<7A>datas r<00>_openzFtexImageFile._openJs<><00><00><13>w<EFBFBD>w<EFBFBD>"<22>"<22>"<22><16>t<EFBFBD>w<EFBFBD>w<EFBFBD>|<7C>|<7C>A<EFBFBD><EFBFBD>'<27>$<24>C<EFBFBD><1D>c<EFBFBD>"<22> "<22><0E> <0A> <0A>d<EFBFBD>D<EFBFBD>G<EFBFBD>G<EFBFBD>L<EFBFBD>L<EFBFBD><11>O<EFBFBD>,<2C><1B>]<5D>]<5D>5<EFBFBD>$<24>'<27>'<27>,<2C>,<2C>q<EFBFBD>/<2F>:<3A><04>
<EFBFBD>%+<2B>]<5D>]<5D>5<EFBFBD>$<24>'<27>'<27>,<2C>,<2C>q<EFBFBD>/<2F>%J<>"<22> <0C>l<EFBFBD><1C>q<EFBFBD> <20> <20> <20><1E> <0A> <0A>e<EFBFBD>T<EFBFBD>W<EFBFBD>W<EFBFBD>\<5C>\<5C>!<21>_<EFBFBD>=<3D> <0A><06><05> <0C><07><07> <0C> <0C>U<EFBFBD><1B><1F><1D><1D>t<EFBFBD>T<EFBFBD>W<EFBFBD>W<EFBFBD>\<5C>\<5C>!<21>_<EFBFBD>=<3D><0E><1B><13>w<EFBFBD>w<EFBFBD>|<7C>|<7C>K<EFBFBD>(<28><04> <11>V<EFBFBD>[<5B>[<5B> <20><1F>D<EFBFBD>J<EFBFBD>"<22><1F><1F><15><06><14><19><19>0B<30>A<EFBFBD>t<EFBFBD>L<>M<>D<EFBFBD>I<EFBFBD> <13>v<EFBFBD>*<2A>*<2A> *<2A><1E>D<EFBFBD>J<EFBFBD>"<22><1F><1F><15><06><14><19><19>0B<30>A<EFBFBD>u<EFBFBD>M<>N<>D<EFBFBD>I<EFBFBD>8<><14>f<EFBFBD><1C><0E>G<>C<EFBFBD><1C>S<EFBFBD>/<2F> !<21> <0C><07><07> <0A> <0A><0F><19>$<24>-<2D><04>rc<01><00>y<00>Nr)r,<00>poss r<00> load_seekzFtexImageFile.load_seekjs<00><00> rN)<02>return<72>None)r7<00>intr9r:)r r r r0<00>format_descriptionr4r8rrrrrFs<00><00> <13>F<EFBFBD>8<><16> <20>@ rrc<01>,<00>|jt<00>Sr6)<02>
startswith<EFBFBD>MAGIC)<01>prefixs rrrns<00><00> <11> <1C> <1C>U<EFBFBD> #<23>#rz.ftcz.ftu)r@<00>bytesr9<00>bool)<12>__doc__<5F>
__future__rr!<00>enumr<00>ior<00>rrr?r
rr<00> register_openr0<00>register_extensionsrrr<00><module>rJs~<00><01>3<04>j#<23> <0A><18><16><1E><0F><05><15>W<EFBFBD><15>
% <0A>I<EFBFBD>'<27>'<27>% <0A>P$<24><14><05><13><13>M<EFBFBD>(<28>(<28>-<2D><17>A<><19><05><19><19>-<2D>.<2E>.<2E><16><16>0@<40>Ar