
    ROjA                     6    d dl Z d dlmZ d dlmZ d dlmZ d Zy)    N)restore_face)upscale_image)Timerc                     t               }t               }t        |       }t        d|j                          d       t               }t	        |      }t        d|j                          d       t               }t        j                  d|t
        j                  dg      \  }}|st        d      t        d|j                          d       t        d       t        d	|j                          d       t        d       |j                         S )
NzFace Restore : z secz
Upscale : z.png   zFailed to encode image.zPNG Encode : z&--------------------------------------zTotal Enhance : )
r   r   printstopr   cv2imencodeIMWRITE_PNG_COMPRESSION	Exceptiontobytes)imagetotal_timertimerrestoredupscaledsuccessencodeds          =F:\Balli\ai-photo-editor\app\modules\enhanceImage\enhancer.pyenhancer      s    'K GEE"H	OEJJL>
./ GEX&H	Juzz|nD
)* GE|| ''	
GW 122	M%**,t
,-	
23	[--/0
56	
23??    )r
   %app.modules.enhanceImage.face_restorer   !app.modules.enhanceImage.upscalerr   app.utils.timerr   r    r   r   <module>r      s    
 "4r   