¡@

Home 

python Programming Glossary: sin_a

Rotate image and crop out black borders

http://stackoverflow.com/questions/16702966/rotate-image-and-crop-out-black-borders

at the first quadrant and the absolute values of sin cos sin_a cos_a abs math.sin angle abs math.cos angle if side_short 2... abs math.sin angle abs math.cos angle if side_short 2. sin_a cos_a side_long # half constrained case two crop corners touch.. line parallel to the longer line x 0.5 side_short wr hr x sin_a x cos_a if width_is_longer else x cos_a x sin_a else # fully..