Files
old-saburly-wagtail-web/env/lib/python3.10/site-packages/PIL/__pycache__/FtexImagePlugin.cpython-310.pyc

73 lines
3.8 KiB
Plaintext
Raw Normal View History

2024-08-27 20:33:44 +02:00
o
<00><><EFBFBD>f<EFBFBD> <00>@s<>dZddlmZddlZddlmZddlmZddlm Z m
Z
dZ Gd d
<EFBFBD>d
e<05>Z Gd d <0C>d e
j
<EFBFBD>Z ddd<12>Ze <09>e je e<0E>e <09>e jddg<02>dS)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@seZdZdZdZdS)<04>FormatrrN)<05>__name__<5F>
__module__<EFBFBD> __qualname__<5F>DXT1<54> UNCOMPRESSED<45>rr<00>U/home/amir/Desktop/saburlyweb/env/lib/python3.10/site-packages/PIL/FtexImagePlugin.pyrAsrc@s(eZdZdZdZd dd<06>Zd d d
<EFBFBD>Zd S)<0E> FtexImageFile<6C>FTEXzTexture File Format (IW2:EOC)<29>return<72>NonecCs.t|j<01>d<01><01>sd}t|<01><01>t<04>d|j<01>d<01><01>t<04>d|j<01>d<05><01>|_t<04>d|j<01>d<05><01>\}}d|_|dks8J<00>t<04>d|j<01>d<05><01>\}}|j<01>|<05>t<04>d|j<01>d<01><01>\}|j<01>|<06>}|t j
krod|_d d
|j d dfg|_ n|t j kr<>d d
|j d d fg|_ n dt|<04><01><00>}t|<01><01>|j<01><10>t|<07>|_dS)N<>znot an FTEX filez<iz<2i<32><00>RGBr<00>RGBA<42>bcn)rrr<00>raw)rrrz$Invalid texture compression format: )<12>_accept<70>fp<66>read<61> SyntaxError<6F>struct<63>unpack<63>_size<7A>_mode<64>seekrr <00>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>datarrr<00>_openJs*   


zFtexImageFile._open<65>pos<6F>intcCsdS)Nr)r(r1rrr<00> load_seekjszFtexImageFile.load_seekN)rr)r1r2rr)r r
r r,<00>format_descriptionr0r3rrrrrFs

 r<00>prefix<69>bytesr<00>boolcCs|dd<01>tkS)Nr)<01>MAGIC)r5rrrrnsrz.ftcz.ftu)r5r6rr7)<12>__doc__<5F>
__future__rr<00>enumr<00>ior<00>rrr8rrr<00> register_openr,<00>register_extensionsrrrr<00><module>s 5  
(