3 }úÿ\b ã@sHddlmZmZddlmZmZmZdZ Gdd„dejƒZ d dd„Z d S) é)Ú ImageFileÚ ImagePalette)Úi8Úi16beÚi32bez0.1c@seZdZdZdZdd„ZdS)Ú GdImageFileZGDzGD uncompressed imagescCsæ|jjdƒ}t|dd…ƒdkr(tdƒ‚d|_t|dd…ƒt|dd…ƒf|_t|dƒ}|rddnd }t|d |d |d…ƒ}|d kr–||jd <t j d |d |dd |dd…ƒ|_ dd|j d |dddfg|_ dS)Ni ééþÿéÿÿzNot a valid GD 2.x .gd fileÚLéééééZ transparencyZXBGRÚrawr)r r i)rri)r rr)ÚfpÚreadÚi16Ú SyntaxErrorÚmodeÚ_sizerÚi32ÚinforrZpaletteÚsizeZtile)ÚselfÚsZ trueColorZtrueColorOffsetZtindex©rúg/private/var/folders/pf/wv4htv3x0qs2c2mp0dnn0kchsvlck3/T/pip-install-i584jbuk/Pillow/PIL/GdImageFile.pyÚ_open-s "   &zGdImageFile._openN)Ú__name__Ú __module__Ú __qualname__ÚformatÚformat_descriptionrrrrrr(srÚrc Cs:|dkrtdƒ‚yt|ƒStk r4tdƒ‚YnXdS)a) Load texture from a GD image file. :param filename: GD file name, or an opened file handle. :param mode: Optional mode. In this version, if the mode argument is given, it must be "r". :returns: An image instance. :raises IOError: If the image could not be read. r%zbad modezcannot identify this image fileN)Ú ValueErrorrrÚIOError)rrrrrÚopenGs r(N)r%) ÚrrÚ_binaryrrrrrÚ __version__rr(rrrrÚs