Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 iaˆã@sºddlZddlmZmZdZdd„ZGdd„dƒZdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dd„Z iZx:eeƒjƒƒD](\ZZedd…dkr~eeedd…<q~Wifdd„ZdS)éNé)ÚImageÚ _imagingmathcCst|ttfƒS)N)Ú isinstanceÚintÚfloat)Úv©r ú./tmp/tmp5hum_rxs/lib64/python/PIL/ImageMath.pyÚ _isconstantsr c@s"eZdZdZdd„Zdd„ZdGdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3d4„Zd5d6„Zd7d8„Zd9d:„Zd;d<„Z d=d>„Z!d?d@„Z"dAdB„Z#dCdD„Z$dEdF„Z%dS)HÚ_Operandz4Wraps an image operand, providing standard operatorscCs ||_dS)N)Úim)Úselfr r r r Ú__init__ sz_Operand.__init__cCs„t|tƒrH|jjdkr"|jjdƒS|jjdkr4|jStd|jj›�ƒ‚n8t|ƒrn|jjdkrntjd|jj |ƒStjd|jj |ƒSdS) NÚ1ÚLÚIÚFzunsupported mode: )rr)rr)rrr) rr r ÚmodeÚconvertÚ ValueErrorr rÚnewÚsize)rÚim1r r r Z__fixup#s    z_Operand.__fixupNcCs |j|ƒ}|dkr˜tj|p|j|jdƒ}|jƒytt|d|jƒ}Wn4tk r|}zt d|›d�ƒ|‚WYdd}~XnXtj ||j j |j j ƒ�nl|j|ƒ}|j|jkrê|jdkrÂ|j dƒ}|jdkrÖ|j dƒ}|j|jkrêtdƒ‚|j|jk�rpt|jd|jdƒt|jd|jdƒf}|j|k�r>|jd|ƒ}|j|k�rX|jd |ƒ}tj|�pf|j|dƒ}ntj|�p~|j|jdƒ}|jƒ|jƒytt|d|jƒ}Wn6tk �ræ}zt d|›d�ƒ|‚WYdd}~XnXtj||j j |j j |j j ƒt|ƒS) NÚ_zbad operand type for 'ú'rz mode mismatchrr)rr)rr)Ú_Operand__fixuprrrrÚloadÚgetattrrÚAttributeErrorÚ TypeErrorZunopr ÚidrrÚminZcropZbinopr )rÚoprZim2rÚoutÚerr r r Úapply4sB $       ,  $z_Operand.applycCs|jjƒdk S)N)r Zgetbbox)rr r r Ú__bool__^sz_Operand.__bool__cCs |jd|ƒS)NÚabs)r&)rr r r Ú__abs__bsz_Operand.__abs__cCs|S)Nr )rr r r Ú__pos__esz_Operand.__pos__cCs |jd|ƒS)NÚneg)r&)rr r r Ú__neg__hsz_Operand.__neg__cCs|jd||ƒS)NÚadd)r&)rÚotherr r r Ú__add__lsz_Operand.__add__cCs|jd||ƒS)Nr-)r&)rr.r r r Ú__radd__osz_Operand.__radd__cCs|jd||ƒS)NÚsub)r&)rr.r r r Ú__sub__rsz_Operand.__sub__cCs|jd||ƒS)Nr1)r&)rr.r r r Ú__rsub__usz_Operand.__rsub__cCs|jd||ƒS)NÚmul)r&)rr.r r r Ú__mul__xsz_Operand.__mul__cCs|jd||ƒS)Nr4)r&)rr.r r r Ú__rmul__{sz_Operand.__rmul__cCs|jd||ƒS)NÚdiv)r&)rr.r r r Ú __truediv__~sz_Operand.__truediv__cCs|jd||ƒS)Nr7)r&)rr.r r r Ú __rtruediv__�sz_Operand.__rtruediv__cCs|jd||ƒS)NÚmod)r&)rr.r r r Ú__mod__„sz_Operand.__mod__cCs|jd||ƒS)Nr:)r&)rr.r r r Ú__rmod__‡sz_Operand.__rmod__cCs|jd||ƒS)NÚpow)r&)rr.r r r Ú__pow__Šsz_Operand.__pow__cCs|jd||ƒS)Nr=)r&)rr.r r r Ú__rpow__�sz_Operand.__rpow__cCs |jd|ƒS)NÚinvert)r&)rr r r Ú __invert__‘sz_Operand.__invert__cCs|jd||ƒS)NÚand)r&)rr.r r r Ú__and__”sz_Operand.__and__cCs|jd||ƒS)NrB)r&)rr.r r r Ú__rand__—sz_Operand.__rand__cCs|jd||ƒS)NÚor)r&)rr.r r r Ú__or__šsz_Operand.__or__cCs|jd||ƒS)NrE)r&)rr.r r r Ú__ror__�sz_Operand.__ror__cCs|jd||ƒS)NÚxor)r&)rr.r r r Ú__xor__ sz_Operand.__xor__cCs|jd||ƒS)NrH)r&)rr.r r r Ú__rxor__£sz_Operand.__rxor__cCs|jd||ƒS)NÚlshift)r&)rr.r r r Ú __lshift__¦sz_Operand.__lshift__cCs|jd||ƒS)NÚrshift)r&)rr.r r r Ú __rshift__©sz_Operand.__rshift__cCs|jd||ƒS)NÚeq)r&)rr.r r r Ú__eq__­sz_Operand.__eq__cCs|jd||ƒS)NÚne)r&)rr.r r r Ú__ne__°sz_Operand.__ne__cCs|jd||ƒS)NÚlt)r&)rr.r r r Ú__lt__³sz_Operand.__lt__cCs|jd||ƒS)NÚle)r&)rr.r r r Ú__le__¶sz_Operand.__le__cCs|jd||ƒS)NÚgt)r&)rr.r r r Ú__gt__¹sz_Operand.__gt__cCs|jd||ƒS)NÚge)r&)rr.r r r Ú__ge__¼sz_Operand.__ge__)NN)&Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr&r'r)r*r,r/r0r2r3r5r6r8r9r;r<r>r?rArCrDrFrGrIrJrLrNrPrRrTrVrXrZr r r r r sF *r cCst|jjdƒƒS)Nr)r r r)rr r r Ú imagemath_intÁsr_cCst|jjdƒƒS)Nr)r r r)rr r r Úimagemath_floatÅsr`cCs|jd||dd�S)NrOr)r)r&)rr.r r r Úimagemath_equalÊsracCs|jd||dd�S)NrQr)r)r&)rr.r r r Úimagemath_notequalÎsrbcCs|jd||ƒS)Nr")r&)rr.r r r Ú imagemath_minÒsrccCs|jd||ƒS)NÚmax)r&)rr.r r r Ú imagemath_maxÖsrecCst|jj|ƒƒS)N)r r r)rrr r r Úimagemath_convertÚsrfé Z imagemath_c Ksxtjƒ}|j|ƒ|j|ƒx.t|jƒƒD]\}}t|dƒr*t|ƒ||<q*Wtj||ƒ}y|j St k rr|SXdS)aÝ Evaluates an image expression. :param expression: A string containing a Python-style expression. :param options: Values to add to the evaluation context. You can either use a dictionary, or one or more keyword arguments. :return: The evaluated expression. This is usually an image object, but can also be an integer, a floating point value, or a pixel tuple, depending on the expression. r N) ÚopsÚcopyÚupdateÚlistÚitemsÚhasattrr ÚbuiltinsÚevalr r)Z expressionÚ_dictÚkwÚargsÚkrr$r r r roäs    ro)rnÚrrÚVERBOSEr r r_r`rarbrcrerfrhrkÚglobalsrlrsrror r r r Ús"%