Module ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareEq NameLoad NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad If CompareGt NameLoad NameLoad body Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore Num Assign NameStore NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpSub BinOpDiv NameLoad Num BinOpDiv NameLoad Num orelse If CompareLtE NameLoad NameLoad body Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore Num Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpSub BinOpDiv NameLoad Num BinOpDiv NameLoad Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Num body Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad BinOpMult NameLoad BinOpSub Num BinOpMult Num NameLoad BinOpMult NameLoad BinOpSub Num BinOpMult Num NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpAdd NameLoad BinOpMult NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad If CompareGt NameLoad NameLoad body Assign NameStore Num Assign NameStore NameLoad Assign NameStore BinOpMult NameLoad NameLoad Assign NameStore BinOpSub BinOpDiv NameLoad Num BinOpDiv NameLoad Num orelse Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore Num Assign NameStore NameLoad Assign NameStore BinOpDiv NameLoad NameLoad Assign NameStore BinOpSub BinOpDiv NameLoad Num BinOpDiv NameLoad Num Return TupleLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return TupleLoad Num Num NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Import alias Expr Call AttributeLoad NameLoad attr
N/A PIL Image N/A CROP 1 N/A FIT 2 N/A FILL 3 N/A PAD 4 ImageScale N/A object N/A __init__ N/A N/A self path N/A N/A N/A N/A self path path N/A adjust_size N/A N/A self dst_x dst_y mode N/A FIT N/A N/A 
        given a x and y of dest, determine the ratio and return
        an (x,y,w,h) for a output image.
         N/A image N/A N/A Image open N/A self path N/A N/A width height N/A image size N/A N/A mode FIT N/A N/A N/A adjust_crop dst_x dst_y width height N/A N/A adjust_crop N/A N/A dst_w dst_h img_w img_h N/A N/A N/A 
    given a x and y of dest, determine the ratio and return
    an (x,y,w,h) for a cropped image (note x or y could be neg).
    >>> adjust_crop(4,3,5,5)
    (0, -0.5, 4.0, 4.0)
    >>> adjust_crop(8,6,5,5)
    (0, -1.0, 8.0, 8.0)
    >>> adjust_crop(4,3,5,2)
    (-1.75, 0, 7.5, 3.0)
    >>> adjust_crop(8,6,5,2)
    (-3.5, 0, 15.0, 6.0)
     N/A dst_w N/A float dst_w N/A dst_h N/A float dst_h N/A img_w N/A float img_w N/A img_h N/A float img_h N/A dst_ratio N/A N/A float dst_w dst_h N/A img_ratio N/A N/A float img_w img_h N/A N/A dst_ratio img_ratio N/A N/A scale N/A dst_w img_w N/A x 0 N/A w dst_w N/A h N/A img_h scale N/A y N/A N/A dst_h 2 N/A h 2 N/A N/A N/A dst_ratio img_ratio N/A N/A scale N/A dst_h img_h N/A y 0 N/A w N/A img_w scale N/A h N/A img_h scale N/A x N/A N/A dst_w 2 N/A w 2 N/A N/A x y w h N/A adjust_pad N/A N/A dst_w dst_h img_w img_h amount N/A 0.1 N/A N/A N/A x y w h N/A adjust_fit N/A dst_w N/A 1 N/A 2 amount N/A dst_h N/A 1 N/A 2 amount img_w img_h N/A x N/A x N/A dst_w amount N/A y N/A y N/A dst_h amount N/A N/A x y w h N/A adjust_fit N/A N/A dst_w dst_h img_w img_h N/A N/A N/A 
    given a x and y of dest, determine the ratio and return
    an (x,y,w,h) for a fitted image (note x or y could be neg).
    >>> adjust_fit(4,3,5,5)
    (0.5, 0, 3.0, 3.0)
    >>> adjust_fit(8,6,5,5)
    (1.0, 0, 6.0, 6.0)
    >>> adjust_fit(4,3,5,2)
    (0, 0.69999999999999996, 4.0, 1.6000000000000001)
    >>> adjust_fit(8,6,5,2)
    (0, 1.3999999999999999, 8.0, 3.2000000000000002)
     N/A dst_w N/A float dst_w N/A dst_h N/A float dst_h N/A img_w N/A float img_w N/A img_h N/A float img_h N/A dst_ratio N/A N/A float dst_w dst_h N/A img_ratio N/A N/A float img_w img_h N/A N/A dst_ratio img_ratio N/A N/A y 0 N/A h dst_h N/A w N/A h img_ratio N/A x N/A N/A dst_w 2 N/A w 2 N/A N/A scale N/A dst_h img_h N/A x 0 N/A w dst_w N/A h N/A w img_ratio N/A y N/A N/A dst_h 2 N/A h 2 N/A N/A x y w h N/A adjust_fill N/A N/A dst_w dst_h img_w img_h N/A N/A N/A N/A 0 0 dst_w dst_h N/A N/A N/A __name__ __main__ N/A N/A doctest N/A N/A N/A doctest testmod