*ec@sddlmZdZddlmZmZmZddlmZm Z m Z m Z m Z dZ de fdYZdZd ejfd YZejd eeejd d ejd d dS(i(tprint_functions0.4(tImaget ImageFilet ImagePalette(ti8ti16ti32t ChunkStreamt_MODESsARG  t ArgStreamcBseZdZdZdZdZdZdZdZdZ dd Z d Z d Z d Z d ZdZdZdZdZdZdZdZdZdZdZRS(sParser callbacks for ARG datacCs9tj||d|_d|_d|_|jdS(Ni(Rt__init__teoftNonetimtpalettet_ArgStream__reset(tselftfp((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyR %s    cCs1d|_d|_d|_i|_i|_dS(NitNONE(R(tcountR tidtactiontimagestnames(R((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt__reset0s     cCs|jdkrtdn|jj|}t|t|df|_y4tt|dt|df\|_|_ WntdnXt j rt d|jt d|j|j n|S( sAHDR -- animation headerismisplaced AHDR chunkiii sunknown ARG modes AHDR sizes AHDR mode( Rt SyntaxErrorRtreadRtsizeRRtmodetrawmodeRtDEBUGtprint(Rtoffsettbytests((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt chunk_AHDR<s4 cCs|jdkrtdnd|_d|_d|_d|_|jj|}t|dkrt ||_t|dkrt |dd!|_t|dkrt |dd!|_qd|_qnt j rt d|j|jn|S( sAFRM -- next frame followsismisplaced AFRM chunkiiiitAFRMN( RRtshowRR trepairRRtlenRRRR(RR R!R"((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt chunk_AFRMPs"     cCs|jdkrtdnd|_d|_d|_d|_|jj|}t|dkrt ||_t|dkrt |dd!|_qnt j rt d|j|jn|S(sADEF -- store imageismisplaced ADEF chunkiiitADEFN( RRR%RR R&RRR'RRRR(RR R!R"((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt chunk_ADEFks     cCsD|jdkrtdn|jj|}||j|j<|S(sNAME -- name the current imageismisplaced NAME chunk(RRRRRR(RR R!tname((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt chunk_NAMEs cCs/tjrtdnd|_tddS(sAEND -- end of animationtAENDisend of ARG fileN(RRRR tEOFError(RR R!((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt chunk_AENDs   icCst|t|df}y.tt|dt|df\}}WntdnX|rt|drynt|drtdqn|||fS(Niii sunknown image modei i sunknown filter category(RRRR(RR"tfullRRR((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt __getmodesizes.cCs-|jdkrtdn|jd k rY|j|jj|j|j|jdkrtdn|jj|}|j|S(sSYNC -- reset decoderismisplaced sYNC chunk(RRRRR(RR R!R"((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt chunk_sYNCs  (t__name__t __module__t__doc__R RR#R(R*R,R/R<R:R?RGRKRNRQRVRXRYRZRWR6RdRe(((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyR "s.     %   !         cCs|d tkS(Ni(tMAGIC(tprefix((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt_acceptst ArgImageFilecBsAeZdZdZdZdZdZdZdZRS(tARGsAnimated raster graphicscCstjrtjjdtn|jjdtkrFtdnt|j|_ |j j\}}}|dkrtdn|j j |||}|j j |||j j |_ |j j |_ dS(NsThe ArgImagePlugin driver is obsolete, and will be removed from a future release of PIL. If you rely on this module, please contact the PIL authors.isnot an ARG filetAHDRsexpected an AHDR chunk(RtwarningstwarntRuntimeWarningRRRiRR targtcalltcrcRR(RR]R R!R"((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyt_opens    cCsT|jjdkr"|jdn|jj|_|jj|_tjj|dS(Ni(RrR R tseekRRtload(R((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyRws cCs|jjrtdn|jj|_xtr|jj\}}}|jjrftdny|jj|||}WnPtk rPn?dk rtjrt ||dn|jj|}nX|jj ||q-W|jjddS(Nsend of animationtglurks (unknown)i( RrR R.RtTrueRRsRRRRt(RtframeR]R R!R"((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyRvs"      cCsdS(Ni((R((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyttellscCs:|jjd|jj||jjd|_dS(sVerify ARG fileiN(RRvRrtverifytcloseR (R((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyR|s ( RfRgtformattformat_descriptionRuRwRvR{R|(((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyRls   Rms.args video/x-argN(t __future__Rt __version__tPILRRRtPIL.PngImagePluginRRRRRRiR RkRlt register_opentregister_extensiont register_mime(((s8/usr/lib64/python2.7/site-packages/PIL/ArgImagePlugin.pyts(p _