ó <×ï[c@siddlmZddlmZyddlZWn#ek rUddlZeZnXd„ZdZ dS(i(tImage(ti32leiÿÿÿÿNcCsKd„}t|dƒr"||ƒStj|dƒ}||ƒSWdQXdS(s Load texture from a Quake2 WAL texture file. By default, a Quake2 standard palette is attached to the texture. To override the palette, use the putpalette method. :param filename: WAL file name, or an opened file handle. :returns: An image instance. cSs÷|jdƒ}t|dƒt|dƒf}t|dƒ}|j|ƒtj|ƒtjd||j|d|dƒƒ}|jtƒd |_d |_ |d j d dƒd|j d <|d d!j d dƒd}|ró||j ds    .