)Ej+ UddlmZmZddlmZmZmZedZeed<Gdde e e fZ Gdde Z Gd d e ZeGd d Zd S)) dataclassfield)Literal TypeAliascast)AUTO FlateDecode DCTDecode JPXDecode LZWDecodeCCITTFaxDecode ImageFilterceZdZdZedefdZedefdZedefdZedefdZ de fdZ ded ed ed ede eeeeff d Z d S) ImageInfozInformation about an image used in the PDF document (base class). We subclass this to distinguish between raster and vector images.returnc8tt|dS)zIntrinsic image widthwrfloatselfs KC:\PYTHON\MyICR_Suite\python\Lib\site-packages\fpdf/image_datastructures.pywidthzImageInfo.widthE49%%%c8tt|dS)zIntrinsic image heighthrrs rheightzImageInfo.heightrrc8tt|dS);Only available if the image has been placed on the documentrendered_widthrrs rr!zImageInfo.rendered_widthsE4 01222rc8tt|dS)r rendered_heightrrs rr#zImageInfo.rendered_height"sE4 12333rcJd|D}d|dS)Nc&i|]\}}||dvrdn|S))dataiccpsmaskz...).0kvs r z%ImageInfo.__str__..(s:   DHAqA777Q   rzself.__class__.__name__())items)rds r__str__zImageInfo.__str__'s;  LPJJLL   /!....rxyrrc|d}|d}||z }||z|kr||z}|} |||z dz z }n||z } |}||| z dz z }|||| fS)z Make an image fit within a bounding box, maintaining its proportions. In the reduced dimension it will be centered within the available space. rrr)) rr2r3rrimg_wimg_hrationew_wnew_hs rscale_inside_boxzImageInfo.scale_inside_box-s}CyCy  u9q==IEE !e)q AAIEE !e)q A!UE!!rN)__name__ __module__ __qualname____doc__propertyrrrr!r#strr1tupler;r)rrrrs!II&u&&&X&&&&&X&3333X34444X4///// "" "%*"/4" ueUE) *""""""rrc >eZdZdZ d dedededeeeffdZdS) RasterImageInfoz9Information about a raster image used in the PDF documentrrscalerc|d}|d}|dkr|dkr ||z }||z }n|dkr ||z|z }n|dkr||z|z }||fS)Nrrrr))rrrrFr6r7s rsize_in_document_unitsz&RasterImageInfo.size_in_document_unitsEstCyCy 66a1ff A AA !VVE E!AA !VVE E!A!t rN)rE)r<r=r>r?rrBrHr)rrrDrDBsa??23     ).  ue|       rrDceZdZdZdS)VectorImageInfoz9Information about a vector image used in the PDF documentN)r<r=r>r?r)rrrJrJTs????rrJceZdZUeeZeeeezfe d<eeZ ee e fe d<dZ ee d<d dZdS) ImageCache)default_factoryimages icc_profilesr image_filterrNcH|jD]}d|d<dS)Nrusages)rNvalues)rimgs r reset_usageszImageCache.reset_usagescs4;%%''  CCMM  r)rN)r<r=r>rdictrNrArDrJ__annotations__rObytesintrPrrUr)rrrLrLZsr]s,(((((((((++++++++++  Y0"0"0"0"0"S&[!0"0"0"fi$@@@@@i@@@             r